[BUG] containerID prefixed on container name when upgrading manifest [compose v5.0.2]
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.2k
- Forks
- 5.8k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 55
Description
Description
bash-5.1# docker ps | grep logger
8821aa6bfc28 <registry/image>:<version> "/usr/local/bin/.…" 2 hours ago Up 2 hours 5f45c24fb58c_<project>_<service>_1
bash-5.1#
8062626c230e <registry/image>:<version> "server --poll.inter…" 22 minutes ago Up 22 minutes (healthy) 1ab7099277d0_<project2>_<service2>_1
seeing container id prefixed to the container name on compose v5.0.2. the prefixed DOES NOT MATCH the actual container ID
this was after migrating from compose v1/compose v2.17.
only SOME containers have this prefixed. others are upgraded without ANY issue.
similar to https://github.com/docker/compose/issues/13391 but this time,
- there is no change on reconcile job. so the container id is NOT being repeatedly prefixed.
- the container ID that is prefixed does NOT match the actual container ID
checking the compose logs: havent found anything of value.
the containerID prefix went away once I did a minor change on the manifest and applied it via compose. so an update to the manifest reconciles and fixes the issue.
Steps To Reproduce
- docker runtime 20.x/28.x
- install container installed using docker compose v1/v2.17.1
- upgrade compose version from 1.x/2.17.1 to v5.0.0 [NOTE: this is NOT consistent. i am hitting it randomly for VMs: hit for 5/15 VMs where each VM had around 10 containers].
OR - upgrade the apps themselves once on compose v5
Compose Version
v5.0.2
Docker Environment
localhost:/# docker info
Client:
Version: 28.3.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.24.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.36.2
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 14
Running: 14
Paused: 0
Stopped: 0
Images: 23
Server Version: 28.3.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: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: c787fb98911740dd3ff2d0e45ce88cdf01410486
runc version: 4ca628d1d4c974f92d24daccb901aa078aad748e
init version:
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-151-generic
Operating System: Alpine Linux v3.22
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 30.42GiB
Name: localhost
ID: 3ce4cb15-f693-46aa-9cd4-6289c56a4f0e
Docker Root Dir: /rw/host/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
bash-5.1# docker version
Client:
Version: 20.10.11
API version: 1.41
Go version: go1.17.3
Git commit: dea9396e184290f638ea873c76db7c80efd5a1d2
Built: Fri Nov 19 03:07:44 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.17.3
Anything else?
localhost:/# docker version
Client:
Version: 28.3.3
API version: 1.51
Go version: go1.24.4
Git commit: 980b85681696fbd95927fd8ded8f6d91bdca95b0
Built: Tue Jul 29 15:17:52 2025
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 28.3.3
API version: 1.51 (minimum version 1.24)
Go version: go1.24.4
Git commit: bea959c7b793b32a893820b97c4eadc7c87fabb0
Built: Tue Jul 29 15:17:52 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.1.3
GitCommit: c787fb98911740dd3ff2d0e45ce88cdf01410486
runc:
Version: 1.3.0
GitCommit: 4ca628d1d4c974f92d24daccb901aa078aad748e
docker-init:
Version: 0.19.0
GitCommit:
localhost:/#
bash-5.1# docker version
Client:
Version: 20.10.11
API version: 1.41
Go version: go1.17.3
Git commit: dea9396e184290f638ea873c76db7c80efd5a1d2
Built: Fri Nov 19 03:07:44 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.17.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the upgrade from Compose v1 or v2.17.1 to v5.0.2 and compare docker ps names with the reported container IDs; review the Compose logs and the supplied Docker version details. Done means the upgrade no longer adds a non-matching container ID prefix, including for the intermittently affected containers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100