Skip to content
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] services.profiles changes trigger a re-creation of the container #12260

Closed
blop opened this issue Oct 31, 2024 · 0 comments · Fixed by #12265
Closed

[BUG] services.profiles changes trigger a re-creation of the container #12260

blop opened this issue Oct 31, 2024 · 0 comments · Fixed by #12265

Comments

@blop
Copy link

blop commented Oct 31, 2024

Description

When you update the "profiles" of a service, docker compose will recreate the service even if nothing else has been modified.
For example if you just add or remove another extra profile from the list.

It seems that the "profiles" should be excluded from the hash computed for the service.

Compose profiles are great and should be working as a 1st class feature ;-)
Also, somewhat related to #11793

Steps To Reproduce

COMPOSE_PROFILES=aaa

services:
myapp:
profiles: ["aaa"]

=>

services:
myapp:
profiles: ["aaa", "bbb"]

docker compose up -d will re-create the myapp service after adding (or removing) another unrelated profiles

Compose Version

Docker Compose version v2.29.2

Docker Environment

Client: Docker Engine - Community
Version: 27.2.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.16.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.2
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 21
Running: 21
Paused: 0
Stopped: 0
Images: 7
Server Version: 27.2.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: false
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: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-1014-azure
Operating System: Ubuntu 22.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.29GiB
Name: vm-prd-com-med-02
ID: 3f559f11-60d6-434a-94fa-3b5b4b0a1a67
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant