Command `up` with `--renew-anon-volumes` recreate containers when no anon volumes
Description of the issue
When docker compose up command is used with option --renew-anon-volumes on service with only named volumes, containers are recreated.
Context information (for bug reports)
Output of docker-compose version
docker-compose version 1.29.1, build c34c88b2
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
Output of docker version
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:47:17 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:45:28 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker-compose config
(Make sure to add the relevant -f and other flags)
version: '3.9'
volumes:
data:
services:
test:
image: alpine
stdin_open: yes
tty: yes
volumes:
- data:/srv
Steps to reproduce the issue
- docker-compose up -d
- docker-compose up -d -V
Observed result
Recreating test_test_1 ...
Expected result
test_test_1 is up-to-date
Additional information
Ubuntu focal, docker installed from docker documentation, and docker-compose install from a curl
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The named volumes also get recreated when using up with --renew-anon-volumes. It makes this flag unusable
This issue has been automatically marked as not stale anymore due to the recent activity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.
This issue has been automatically closed because it had not recent activity during the stale period.