diff --git a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go index 47a4ffd962..671ff68a6e 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go @@ -116,7 +116,10 @@ func storeConfigInVolume( if err != nil { return stacktrace.NewError("An error occurred getting auth for registry '%v' from Docker config: %v", registry, err) } - cfg.Auths[registry] = *creds + // creds can be nil if the registry doesn't have auth + if creds != nil { + cfg.Auths[registry] = *creds + } } cfgJsonStr, err := json.Marshal(cfg)