-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An updated multi-arch image is pulled with wrong architecture #1309
Comments
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏 |
I am experiencing similar issue - due to being stuck with older version of docker (19.03.15), manifest are not properly parsed Typical output:
I have to manually set Watchtower does not seem to honor that and just relies on the docker mechanism to handle platforms, so it fails to pull any new images as the pull does not return anything. Can you make it use the ```--platform`` parameter if possible? Or have a general ENV for setting this globally? |
That seems a bit less useful, as you might only have a single container that you need to use another platform for. But if the container was created with an explicitly defined platform, watchtower should be able to retain that platform. The only issue I see, is correctly identifying that it's using a non-default platform.
I don't know if 2. is possible though, and without it we would pin a container to the previous platform, even though a native one becomes available. But perhaps that's not that much of an issue, especially if we put that behaviour behind a flag, like |
My suggestion - check the container architecture from an inspect and use it as platform. This can be a global flag or per container tag. |
None of that should be needed. The image should have a platform attached to it, which should be the one it pulls next time. I strongly feel there is something else at play here as we rely on the docker engine and dockerhub to do the heavy lifting. |
@simskij well, the image does have a platform, but we are not adding that to the if persistPlatform {
opts.Platform = container.ContainerInfo().Platform
} |
Describe the bug
As I described in #1287 (comment) Watchtower fetches the wrong architecture of multi-arch images than the container is configured.
To Reproduce
docker-compose.yml:
Container was recreated after previous experiments.
Run the update:
And this is an error:
Then my containers and images look like this:
Expected behavior
The architecture of the
httpd:2.4
(which is now 2.4.54) andhttpd:2.4.53
images should match after the upgrade, anddocker compose up --no-start --force-recreate httpd-base
should correctly recreate the service.Screenshots
Environment
Logs from running watchtower with the
--debug
optionAdditional context
Platform of a container is always "linux"
The text was updated successfully, but these errors were encountered: