doesn’t re-create containers with updated images

Description

When run after docker compose pull and new images are pulled, docker compose up -d does not re-create containers that use those images.

Steps to reproduce the issue:

  1. Run docker compose pull to retrieve updated images.
  2. Run docker compose up -d to re-create running containers with the new images.
  3. The command runs, but containers are not re-created as expected.

Describe the results you received:
This is an example of what I saw after running docker compose pull:

[+] Running 33/33
 ⠿ tautulli Pulled                                                                                                                                                                                                                                   2.6s
 ⠿ prowlarr Pulled                                                                                                                                                                                                                                   2.4s
 ⠿ sonarr Pulled                                                                                                                                                                                                                                     2.4s
 ⠿ authelia Pulled                                                                                                                                                                                                                                   2.9s
 ⠿ telegraf Pulled                                                                                                                                                                                                                                   1.1s
 ⠿ qbittorrent Pulled                                                                                                                                                                                                                                2.5s
 ⠿ redis Pulled                                                                                                                                                                                                                                      2.9s
 ⠿ renderer Pulled                                                                                                                                                                                                                                   2.9s
 ⠿ routinator Pulled                                                                                                                                                                                                                                 2.9s
 ⠿ plex Pulled                                                                                                                                                                                                                                      20.5s
   ⠿ bc3f41a6c9ed Already exists                                                                                                                                                                                                                     0.0s
   ⠿ 79de06071b58 Already exists                                                                                                                                                                                                                     0.0s
   ⠿ ae8ccceaa6d8 Already exists                                                                                                                                                                                                                     0.0s
   ⠿ d225d3c4e17c Already exists                                                                                                                                                                                                                     0.0s
   ⠿ c04746114d3a Already exists                                                                                                                                                                                                                     0.0s
   ⠿ 77c2548c96d2 Already exists                                                                                                                                                                                                                     0.0s
   ⠿ 907b5cd7e01c Already exists                                                                                                                                                                                                                     0.0s
   ⠿ 6a3fbe38022f Pull complete                                                                                                                                                                                                                     15.0s
   ⠿ 3c8a064682e0 Pull complete                                                                                                                                                                                                                     15.9s
 ⠿ avahi Pulled                                                                                                                                                                                                                                      1.2s
 ⠿ download Pulled                                                                                                                                                                                                                                   2.7s
 ⠿ sabnzbd Pulled                                                                                                                                                                                                                                    3.1s
 ⠿ radarr Pulled                                                                                                                                                                                                                                     2.5s
 ⠿ diun Pulled                                                                                                                                                                                                                                       2.8s
 ⠿ traefik Pulled                                                                                                                                                                                                                                    2.9s
 ⠿ syslog-ng Pulled                                                                                                                                                                                                                                  2.3s
 ⠿ grafana Pulled                                                                                                                                                                                                                                    2.9s
 ⠿ influxdb Pulled                                                                                                                                                                                                                                   2.9s
 ⠿ unifi Pulled                                                                                                                                                                                                                                      2.5s
 ⠿ overseerr Pulled                                                                                                                                                                                                                                  2.8s
 ⠿ scrutiny Pulled                                                                                                                                                                                                                                   2.7s
 ⠿ haveged Pulled                                                                                                                                                                                                                                    1.1s
 ⠿ lidarr Pulled                                                                                                                                                                                                                                     2.4s

And this is what I saw when I ran docker compose up -d immediately afterwards:

WARN[0000] volume "routinator_tals" already exists but was not created by Docker Compose. Use `external: true` to use an existing volume 
[+] Running 24/0
 ⠿ Container plex         Running                                                                                                                                                                                                                    0.0s
 ⠿ Container diun         Running                                                                                                                                                                                                                    0.0s
 ⠿ Container prowlarr     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container traefik      Running                                                                                                                                                                                                                    0.0s
 ⠿ Container influxdb     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container scrutiny     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container tautulli     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container syslog-ng    Running                                                                                                                                                                                                                    0.0s
 ⠿ Container redis        Running                                                                                                                                                                                                                    0.0s
 ⠿ Container download     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container avahi        Running                                                                                                                                                                                                                    0.0s
 ⠿ Container telegraf     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container authelia     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container grafana      Running                                                                                                                                                                                                                    0.0s
 ⠿ Container renderer     Running                                                                                                                                                                                                                    0.0s
 ⠿ Container routinator   Running                                                                                                                                                                                                                    0.0s
 ⠿ Container qbittorrent  Running                                                                                                                                                                                                                    0.0s
 ⠿ Container sabnzbd      Running                                                                                                                                                                                                                    0.0s
 ⠿ Container haveged      Running                                                                                                                                                                                                                    0.0s
 ⠿ Container lidarr       Running                                                                                                                                                                                                                    0.0s
 ⠿ Container sonarr       Running                                                                                                                                                                                                                    0.0s
 ⠿ Container radarr       Running                                                                                                                                                                                                                    0.0s
 ⠿ Container overseerr    Running                                                                                                                                                                                                                    0.0s
 ⠿ Container unifi        Running                                                                                                                                                                                                                    0.0s

Describe the results you expected:
The plex container should have been re-created from the new image, but it was not.

Additional information you deem important (e.g. issue happens only occasionally):
This behaviour appears to be consistent since the release of v2.3.x.

Output of docker compose version:

rancher@server:~$ docker compose version
Docker Compose version v2.3.3

Output of docker info:

rancher@server:~$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc., v2.3.3)

Server:
 Containers: 24
  Running: 24
  Paused: 0
  Stopped: 0
 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: 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-gf46b6ba2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.14.270-burmilla
 Operating System: BurmillaOS v1.9.4
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 62.6GiB
 Name: <redacted>
 ID: V7ZG:VX2O:HCK6:7OFY:BBTZ:X4FS:4GI5:XOEB:KXFO:LHMG:UYOO:244G
 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
 Live Restore Enabled: false
 Product License: Community Engine

Additional environment details:

1 thought on “doesn’t re-create containers with updated images

  1. AFAIK has been fixed in 85a4d04 but there’s no released version with the patch yet (was fixed after the release of 2.3.3).

Comments are closed.