Closed
Description
Description
The --rm
flag of docker compose run
is not working with version 2.3.x
The container is created but then it remains in exit status. Up to v2.2.3 it was correctly removed
Steps to reproduce the issue:
- docker-compose.yml
version: "3.9"
services:
alpine:
image: alpine
docker compose run --rm --name mytest alpine hostname
Describe the results you received:
The container remains in exit status
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b139d98c63f3 alpine "hostname" 5 seconds ago Exited (0) 3 seconds ago mytest
Describe the results you expected:
I expect the container to be removed, like it was happening up to v2.2.3
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker compose version
:
Docker Compose version v2.3.4
Output of docker info
:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.8.1)
compose: Docker Compose (Docker Inc., v2.3.4)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 32
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: 1
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: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
Default Runtime: runc
Init Binary: docker-init
containerd version: 2a1d4dbdb2a1030dc5b01e96fb110a9d9f150ecc
runc version: v1.0.3-0-gf46b6ba
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.13.0-35-generic
Operating System: Ubuntu 20.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.53GiB
Name: xxxxxxxxxxxxxxxxx
ID: CCLO:O7YG:FX77:W6HX:WRYV:6D6Z:4QPY:MUPX:HCK4:DMYR:LKSZ:5XLJ
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Additional environment details:
Metadata
Metadata
Assignees
Labels
No labels