compose
compose copied to clipboard
[BUG] Docker compose volume bind error on remote deployments
Description
I have the following problem:
I run docker compose in gitlab pipelines (connect to a remote host with $DOCKER_HOST variable via ssh, then bind directories on the remote host as docker volumes to some compose services) and all of a sudden for the last couple days they started failing with this error:
$ docker compose -f .ci/docker-compose.yml up
service "app" refers to undefined volume /my/directory/on/host: invalid compose project
Downgrading docker compose on the client (docker image) to v2.28.1 from v2.29.0 fixes the issue, but im looking for a long-term solution
Steps To Reproduce
No response
Compose Version
No response
Docker Environment
The current failing pipeline info:
$ docker info
Client:
Version: 27.0.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.16.1
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.0
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 28
Running: 28
Paused: 0
Stopped: 0
Images: 24
Server Version: 27.1.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-113-generic
Operating System: Ubuntu 22.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.82GiB
ID: NBNI:6QWV:DAUM:W5XY:7M7A:7XR2:MXIE:74BC:TS2Q:P5IF:2NPT:UGBC
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
The last successful pipeline (several weeks ago):
$ docker info
Client:
Version: 26.1.4
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.15.1
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.27.2
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 26
Running: 26
Paused: 0
Stopped: 0
Images: 21
Server Version: 25.0.3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-112-generic
Operating System: Ubuntu 22.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.82GiB
ID: NBNI:6QWV:DAUM:W5XY:7M7A:7XR2:MXIE:74BC:TS2Q:P5IF:2NPT:UGBC
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
### Anything else?
_No response_
I think this issue is the same as this one https://github.com/docker/compose/issues/12001
Closing as duplicate