docker / docker/compose

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

Open
#13,809 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/0-triage
Dominant language
Go
Stars
38.2k
Forks
5.8k
Avg merge
2d 14h
Merged PRs (30d)
55

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied compose.yaml and reproduce the behavior using docker compose up, then docker compose pull after mattfly/obsidian:latest changes. Trace the docker compose pull entry point for volumes with type=image and add a regression test showing that the referenced image is updated; done means pull refreshes that image and docker compose up uses the new version.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
cli, devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.