Docker-compose remote host not working

I have been using docker-compose to build and remotely deploy docker images/containers for the past two years (since 2020). Just this last week the my working docker-compose commands fail to connect to my remote host.
I have been using proper DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH variables defined in the .env file. It appears that the commands work, to build and deploy, but they only deploy to my local machine. I have two different desktops (one on windows 10 and one running windows 11) that behave the same way. I am running Docker Desktop 4.12.0 (85629) on both systems.

Commands

  • docker-compose down
  • docker-compose build
  • docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Docker versions
Docker Desktop 4.12.0 (85629)
Docker version 20.10.18, build b40c2f6

Client: Docker Engine - Community
Version: 20.10.18
API version: 1.41
Go version: go1.18.6
Git commit: b40c2f6
Built: Thu Sep 8 23:11:34 2022
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.18
API version: 1.41 (minimum version 1.12)
Go version: go1.18.6
Git commit: e42327a
Built: Thu Sep 8 23:09:28 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Things Iā€™ve Done

  1. Upgraded the version of Docker Community on my remote host
  2. Verified that my Remote Host is functioning
  3. Verified that my SSL certificates which are protecting the remote service are valid.

I have opened a ticket with Docker on Friday 9/16/2022, but I havenā€™t heard anything back. Can anyone confirm this issue or do you have any ideas?

Thank you,

Richard

Is anyone else experiencing this same behavior?

  • When did you upgrade to Docker Desktop 4.12? Was it right before it started to fail?
  • Can you use docker run to start a container on the remote host or is it also created locally?

It was either right before or right after. I noticed within the last 6-12 months that if I didnā€™t keep my visual studio 2019 and Docker Desktop up to date that my docker-compose commands would not work as desired.

If I use the following command, I am able run docker commands on the remote host, however I cannot use the docker-compose or docker compose agent to run similar commands

docker --tlsverify -H=ā€˜hostname:2376ā€™ container ls
docker --tlsverify -H=ā€˜hostname:2376ā€™ stop ā€˜container_nameā€™
docker --tlsverify -H=ā€˜hostname:2376ā€™ stop ā€˜container_nameā€™

Hi Rimelek,

Docker Support got back to me yesterday and was able to identify the issue. Docker Compose V2 was turned on in my Docker Desktop and so after unchecking it I was able to proceed as I had in the past. I was able to build and deploy my containers successfully. I am working on getting docker context configured so I can begin using docker compose v2.

1 Like

Thank you for coming back with the solution! It is still strange that Docker Compose v2 affected remote connections, but it is good to know it happened so anyone who experience the same can find your solution.