abiosoft / abiosoft/colima

Metadata.LastTagTime not set correctly - new compose pull_policy settings (weekly, every_...) do not work as intended

Offen
#1,316 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

Docker compose has a new pull_policy setting that allows one to e.g. try a refresh/pull once per week, instead of always or missing or similar.

See: https://github.com/docker/compose/issues/12563
and https://docs.docker.com/reference/compose-file/services/#pull_policy
and https://docs.docker.com/compose/releases/release-notes/#bug-fixes-and-enhancements-3

However, that feature depends on Metadata.LastTagTime setting as is also mentioned in the comment of the issue https://github.com/docker/compose/issues/12563#issuecomment-2674124607

I have tries this with a freshly installed colima and it always returns "0001-01-01 00:00:00 UTC" instead of the last docker image pull or check if pull needed date.

I tried the same with a freshly installed Docker Desktop and there it is set correctly. every time I do a docker image pull, even if there is no updated Metadata.LastTagTime is refreshed.

Without setting this correctly, pull_policy: weekly or similar basically behaves like pull policy always which is not what I want it to.

### Version

Colima: 0.8.1
Using virtiofs und vz
Latest macOS 15.x

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

_No response_

### Reproduction Steps

See that one comment, instead of

```
$ docker image inspect alpine -f '{{ .Metadata.LastTagTime }}'
2025-02-21 09:45:10.235550419 +0000 UTC
$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
Digest: sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
Status: Image is up to date for alpine:latest
docker.io/library/alpine:latest
$ docker image inspect alpine -f '{{ .Metadata.LastTagTime }}'
2025-02-21 10:07:22.382362425 +0000 UTC
```

the inspect commands will always produce "0001-01-01 00:00:00 UTC"

### Expected behaviour

this should work and the pull policy should work correctly

```
$ docker image inspect alpine -f '{{ .Metadata.LastTagTime }}'
2025-02-21 09:45:10.235550419 +0000 UTC
$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
Digest: sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
Status: Image is up to date for alpine:latest
docker.io/library/alpine:latest
$ docker image inspect alpine -f '{{ .Metadata.LastTagTime }}'
2025-02-21 10:07:22.382362425 +0000 UTC
```

### Additional context

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.