compose icon indicating copy to clipboard operation
compose copied to clipboard

Command `up` with `--renew-anon-volumes` recreate containers when no anon volumes

Open melck opened this issue 4 years ago • 5 comments

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

  1. docker-compose up -d
  2. 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

melck avatar Apr 29 '21 14:04 melck

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.

stale[bot] avatar Oct 30 '21 16:10 stale[bot]

The named volumes also get recreated when using up with --renew-anon-volumes. It makes this flag unusable

tzoratto avatar Dec 15 '21 16:12 tzoratto

This issue has been automatically marked as not stale anymore due to the recent activity.

stale[bot] avatar Dec 15 '21 16:12 stale[bot]

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.

stale[bot] avatar Jul 10 '22 12:07 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Jul 31 '22 23:07 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Aug 13 '22 12:08 stale[bot]