Skip to content

[BUG] docker compose pull does not update images that are used in volumes with type=image #13809

Open

Description

@oskolist

Description

I use volumes with type=image a lot. offen because it allows me add static apps to nginx without having a seperate container running another nginx. this works prefectly but I don't have a way to automatically update the used images. I can iterate and do docker pull on each image but i think the purpose of docker compose pull was exactly to do that.

Steps To Reproduce

for example create compose.yaml with this content:

services:
  nginx:
    image: "nginx:alpine"
    volumes:
      - type: image
        source: mattfly/obsidian:latest
        target: /srv/http/ObsidianIRC
        image:
          subpath: usr/share/nginx/html/
  • do docker compose up and then ctrl-c
  • wait untill a new release be pushed to mattfly/obsidian:latest
  • do docker compose pull
  • you expect to new version mattfly/obsidian:latest be pulled but it does not and doing docker compose up will run container with the old version of mattfly/obsidian:latest

Compose Version

Docker Compose version v5.1.3

Activity

  1. vaguul commented on Jun 1, 2026

    @vaguul

    Not a maintainer, but this looks consistent with the current pull path.

    docker compose pull iterates project.Services and pulls only service.Image. Image-volume sources are handled separately in pullRequiredImages(), where vol.Type == types.VolumeTypeImage creates a fake ServiceConfig only when that image is missing locally.

    That would explain the behavior here: a missing image volume can be pulled during the required-images path, but docker compose pull does not refresh an already-present image that is referenced only as a volume source.

    A likely fix is for the explicit pull command to also enumerate service.Volumes with vol.Type == types.VolumeTypeImage and treat vol.Source as a pull target, ideally with similar tag/latest and pull-policy handling as normal service images. A regression test could reuse the image-volume fixture pattern and assert that docker compose pull includes the volume image source.

  2. added a commit that references this issue on Jun 7, 2026
    39f6e06
  3. beanscg commented on Jun 10, 2026

    @beanscg

    Bean Labs took a public-source pass on this issue.

    The narrowest useful next step looks like: Offer to build a minimal repro or fixture around compose.yaml and report the exact observed behavior.

    Public evidence checked:

    • Open public issue in docker/compose; repo license Apache-2.0; no assignee; 1 comments.
    • Labels: kind/bug, status/0-triage.
    • Referenced files/paths: compose.yaml.

    A good acceptance check would be a narrow public change that directly exercises the issue's reported boundary.

    No PR opened from this pass.

  4. added a commit that references this issue on Jul 30, 2026
    6718211
  5. added a commit that references this issue on Oct 19, 2026
    8b97451
  6. added a commit that references this issue on Oct 29, 2026
    9df7351
  7. dorian-terbah commented on Nov 16, 2026

    @dorian-terbah

    I have a similar issue on my side. I tested to only pull images on a dummy compose file using docker compose pull.
    The compose file is this one :

    name: probe-image-volume
    
    services:
      web:
        image: hello-world:latest # l'image du service
        volumes:
          - type: image # l'image montée en volume
            source: busybox:1.36
            target: /mnt/busybox
    

    The busydbox image is never pulled, whereas if I up the stack, the image is pulled

  8. added a commit that references this issue on Nov 26, 2026
    7c6a87b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions