Description
network not found when using network_mode:service with --no-deps
Steps To Reproduce
- docker-compose.yaml
services:
app-x:
image: busybox
init: true
command:
- "sleep"
- "1000"
network_mode: service:app-y
app-y:
image: busybox
init: true
command:
- "sleep"
- "1000"
- Run
docker compose up -d
- Run
docker compose up --no-deps app-x
Expected behavior:
app-x recreates successfully
Actual behavior:
Attaching to scratch-app-x-1
Error response from daemon: network service:app-y not found
Compose Version
docker compose version
Docker Compose version v2.21.0-desktop.1
Docker Environment
Client: Docker Engine - Community
Version: 24.0.5
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.0-cloud-driver+002
Path: /home/nick/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.21.0-desktop.1
Path: /usr/lib/docker/cli-plugins/docker-compose
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.0
Path: /usr/lib/docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.20
Path: /usr/lib/docker/cli-plugins/docker-extension
harmonia: A brief description of Harmonia (Docker Inc.)
Version: 1014447
Path: /home/nick/.docker/cli-plugins/docker-harmonia
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v0.1.0-beta.7
Path: /usr/lib/docker/cli-plugins/docker-init
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /usr/lib/docker/cli-plugins/docker-sbom
scan: Docker Scan (Docker Inc.)
Version: v0.26.0
Path: /usr/lib/docker/cli-plugins/docker-scan
scout: Command line tool for Docker Scout (Docker Inc.)
Version: 0.24.1
Path: /usr/lib/docker/cli-plugins/docker-scout
sleep: (Docker Inc.)
Version: 0.1.0
Path: /home/nick/.docker/cli-plugins/docker-sleep
Server:
Containers: 7
Running: 5
Paused: 0
Stopped: 2
Images: 39
Server Version: 24.0.5
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 logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
runc version: v1.1.8-0-g82f18fe
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-82-generic
Operating System: Linux Mint 21.1
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.25GiB
Name: grumpy
ID: 9cba2c25-6ba4-4f6c-995c-53aacc5cc77e
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
This works as expected on Docker Compose v1
Original upstream bug report: tilt-dev/tilt#6221
This bug is similar - #10996 - but was originally filed by a different person, not sure if they're on the same team or related to each other.
Description
network not found when using network_mode:service with --no-deps
Steps To Reproduce
docker compose up -ddocker compose up --no-deps app-xExpected behavior:
app-x recreates successfully
Actual behavior:
Compose Version
Docker Environment
Anything else?
This works as expected on Docker Compose v1
Original upstream bug report: tilt-dev/tilt#6221
This bug is similar - #10996 - but was originally filed by a different person, not sure if they're on the same team or related to each other.