Repository navigation
[BUG] Impossible to build on remote since 2.38.2 #13134
Description
Activity
The issue is related to this PR #13007
We used to always passDOCKER_HOSTenv to the bake command, now we specify the env value conditionallyif endpoint.Host != actualHost { // We are running with `--host` or `DOCKER_HOST` which overrides selected context env["DOCKER_HOST"] = actualHost }In my case, the condition is false with/without the
-Hargument.
Either we should fix the condition, OR always passDOCKER_HOSTto the bake command.@ndeloof could you please check it? I don't know why you assume this
We are running with--hostorDOCKER_HOSTwhich overrides selected contextin case of theendpoint.Hostis not equal to theactualHostSame problem here. Workaround by passing the
DOCKER_HOSTenv var to the docker compose build command instead of the--hostargument@idsulik to prevent #13015 we need to detect the current endpoint address is not the one set by context.
dockerCli.ContextStore().GetMetadata(s.dockerCli.CurrentContext())is expected to report the current context definition, which I would expect is not be impacted by--host.. but is actually 🥹 (I wonder this is a recent change in docker/cli ?)I'm investigating for a fix
Reacted by Suleiman Dibirovis expected to report the current context definition, which I would expect is not be impacted by --host .. but is actually 🥹 (I wonder this is a recent change in docker/cli ?)
I think that was always the case and by design; when using either
DOCKER_HOSTor-H/--host, the context is disabled, and the options as specified on the command-line are used (including TLS options, which are otherwise set by the context); here's with a docker 23.0 CLI, which also showed that behavior, so that's not a recent change;docker context ls NAME DESCRIPTION DOCKER ENDPOINT ERROR default Current DOCKER_HOST based configuration unix:///var/run/docker.sock my-context * Current DOCKER_HOST based configuration unix:///var/run/docker.sock docker -H unix:///var/run/docker.sock context ls NAME DESCRIPTION DOCKER ENDPOINT ERROR default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock my-context Current DOCKER_HOST based configuration unix:///var/run/docker.sock
What potentially did change, is that
buildxnow imports all the top-level options from the CLI, so when running standalone (?) also uses the same flags and env-vars; docker/buildx#3087
Description
We use docker compose to build images on remote servers.
It worked fine until
docker-compose-plugin 2.38.2.Since then, the docker images are now built on local machine.
Steps To Reproduce
What works
docker-compose-plugin=2.38.1-1~ubuntu.25.04~pluckydocker -H ssh://<remoteServer> compose buildWhat does not work
sudo apt remove docker-compose-pluginsudo apt install docker-compose-plugin=2.38.2-1~ubuntu.25.04~pluckydocker -H ssh://<remoteServer> compose buildCompose Version
Docker Environment
Anything else?
I tried with any version >2.38.1, and it never worked