-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Building with Compose on remote Docker server via TLS TCP by setting DOCKER_HOST
is broken
#3081
Comments
despite your detailed reproduction scenario (thanks!), I can't reproduce
|
note: docker compose relies on docker CLI to manage connexion to remote docker host (same codebase), so until distinct versions are running I can't explain a different behavior |
Hi, I gave it another spin. Can you retry it with I've tried it with |
confirmed this is a bug |
note: running buildx standalone demonstrates the same error:
@crazy-max can you please confirm running buildx standalone is supported ? Sounds like there's something missing in docker/cli plugin mechanism to setup docker engine API client for cli plugins ran this way |
I don't have permission to transfert this issue to docker/buildx repository, but with reported reproduction example I can confirm something's wrong with buildx running standalone:
|
Issue transferred, will take look, thanks for reporting. |
Description
After upgrading Docker to version
28.0.4
, building with Compose on remote Docker server via TLS encrypted TCP socket is broken if the connection is defined by settingDOCKER_HOST
,DOCKER_CERT_PATH
andDOCKER_TLS_VERIFY
environment variables.Output:
Using Docker context with the same values still works.
Steps To Reproduce
compose.yaml
with the following content:docker run -d --rm --name dind --privileged --security-opt='no-new-privileges=false' -p 127.0.0.1:2376:2376/tcp -v ./certs:/certs/client docker:dind
docker context create dind --docker "host=tcp://localhost:2376,ca=$(pwd)/certs/ca.pem,cert=$(pwd)/certs/cert.pem,key=$(pwd)/certs/key.pem"
DOCKER_CONTEXT=dind docker build -t foo - <<< 'FROM alpine' && docker exec dind docker image ls
DOCKER_CONTEXT=dind docker compose build && docker exec dind docker image ls
docker exec dind docker image rm foo compose-foo
DOCKER_HOST
works:DOCKER_CERT_PATH="$(pwd)/certs" DOCKER_TLS_VERIFY=1 DOCKER_HOST=tcp://localhost:2376 docker build -t foo - <<< 'FROM alpine' && docker exec dind docker image ls
DOCKER_HOST
exhibits the bug:DOCKER_CERT_PATH="$(pwd)/certs" DOCKER_TLS_VERIFY=1 DOCKER_HOST=tcp://localhost:2376 docker compose build
docker context rm dind && docker container stop dind
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: