with the docker provider, you can configure env va...
# general
i
with the docker provider, you can configure env vars
DOCKER_REGISTRY_PASS
and
DOCKER_REGISTRY_USER
but they dont work unless you add this config
Copy code
config:
  docker:registryAuth:
    - address: <http://ghcr.io|ghcr.io>
im trying to move completely away from configuring providers in stacks and switch to env vars. is there a workaround here? not sure why it needs address because the name im passing to
getRegistryImage
is fully-qualified to ghcr.io
m
Could you do it in code? Something like @icy-controller-6092:
Copy code
const ghcrProvider = new docker.Provider("ghcr", {
  registryAuth: [
    { address: "<http://ghcr.io|ghcr.io>" }, 
  ],
  disableDockerDaemonCheck: true, });
not sure why it needs address because the name im passing to
getRegistryImage
is fully-qualified to ghcr.io
You could create a feature request. https://github.com/pulumi/pulumi/issues
i
i prefer the default providers to be configured properly... otherwise its too easy to create a
new Resource
and forget to add the
provider
option then you end up in a little speed bump where the deploy fails and the error is never a straightforward "you forgot to use the in-code provider" it'll be something that you need to work backwards from to realize that the wrong provider was used and that can take some time depending on the exact error message, & how long it's been since you last had to debug the same issue