-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Services with profile in yml, always enable when execute command start, stop, restart, up #9286
Comments
I’m experiencing this too. It started happening immediately after upgrading to Docker for Mac 3.6.0 which brought with it the new version of Compose. Output of
Output of
The |
Just noticed this as well EDIT: It seems that Compose tries to bring up any container he finds in a project that has already started once, even if stopped. Removing those containers works around the issue, but as soon as they start once they come back again. |
I have also noticed this issue on MacOS using the latest version of Docker Desktop. This is quite a deal breaker, as it renders the profiles feature unusable in most of my development scenarios $ > docker compose version
Docker Compose version v2.3.3 $ > docker context show
default $ > docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.0)
compose: Docker Compose (Docker Inc., v2.3.3)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 19
Running: 0
Paused: 0
Stopped: 19
Images: 25
Server Version: 20.10.13
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
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 logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2a1d4dbdb2a1030dc5b01e96fb110a9d9f150ecc
runc version: v1.0.3-0-gf46b6ba
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.10.104-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 6
Total Memory: 11.67GiB
Name: docker-desktop
ID: UDA4:27AH:5HX2:EOR6:HVM6:KDGM:HF3M:RKUD:KVYP:PXNL:7VSH:ORLU
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false $ > docker version
Client:
Cloud integration: v1.0.22
Version: 20.10.13
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 10 14:08:43 2022
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Desktop 4.6.0 (75818)
Engine:
Version: 20.10.13
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 906f57f
Built: Thu Mar 10 14:05:37 2022
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.5.10
GitCommit: 2a1d4dbdb2a1030dc5b01e96fb110a9d9f150ecc
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0 |
Yeah, I forgot, I'm on macOS as well:
|
For
|
I am having the same issue on MacOS with Docker Desktop 4.7.0 and Docker Compose 2.4.1. When I do But after I stop them, whether this is with |
I feel like it could be useful to include profile information with the project iteself (maybe there are some metadata fields available?), so users aren't required to specify both the project name and the compose files for services that are already part of the project. |
#9365 only seems to fix this for |
It seems to be fixed in |
For me, I am running |
I had this problem when using compose 2.3.3, but now it is manifesting differently in compose 2.5.1. Same experience on mac (Docker Desktop v4.8.2) and linux (without Docker Desktop). Now it just hangs forever during cleanup since it appears to be trying to stop a container that is not running. docker-compose.yaml :
|
Since docker compose v 2.3.0 when ever I run docker compose with command
start
,stop
,restart
, andup
all container for service with profile in docker-compose.yml will be always included even the profile is not enabled.example command
example docker-compose.yml
step by step
The text was updated successfully, but these errors were encountered: