Skip to content
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

docker push fails with latest Docker Engine 27.0.3 due to dependency issues with Docker Engine API version #1063

Closed
1 of 5 tasks
ESKYoung opened this issue Jul 8, 2024 · 5 comments

Comments

@ESKYoung
Copy link

ESKYoung commented Jul 8, 2024

Description

brew install colima docker installs the latest Docker Engine 27.0.3. However, colima uses the Docker Engine API 1.45, instead of the latest API version 1.46.

Due to recent changes, running docker push now raises a note when pushing a single platform image from a multi-platform index. It appears 27.0.3 needs a --platform flag now for docker push, and docker pull, but this needs Docker Engine API 1.4.6, causing a failure:

[ NOTE ] Selecting a single platform will only push one matching image manifest from a multi-platform image index.
This means that any other components attached to the multi-platform image index (like Buildkit attestations) won't be pushed.
If you want to only push a single platform image while preserving the attestations, please use 'docker convert\n'

"platform" requires API version 1.46, but the Docker daemon API version is 1.45

Note that it works with Lima, as Lima uses API version 1.46. I've raised an associated ticket with Docker to clarify the message, and a possible resolution.

Version

colima version 0.6.9
git commit: c3a31ed05f5fab8b2cdbae835198e8fb1717fd0f

runtime: docker
arch: x86_64
client: v27.0.3
server: v27.0.3
limactl version 0.22.0
qemu-img version 9.0.1
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/eric.young/.colima/default/docker.sock

Reproduction Steps

  1. create a simple Dockerfile
    FROM python:3.10-slim
    CMD ["/bin/bash"]
  2. docker build . -t example:latest
  3. docker push example:latest

Expected behaviour

Would expect docker push to work as expected.

Additional context

My ~/.zshrc file has the following environment variable set:

export DOCKER_DEFAULT_PLATFORM=linux/amd64
@abiosoft
Copy link
Owner

abiosoft commented Jul 8, 2024

Does manually updating Docker in the Colima VM work?

# enter colima vm
$ colima ssh

# manually update docker inside colima vm
$ sudo apt upgrade docker-ce containerd.io docker-ce-cli 

@ESKYoung
Copy link
Author

ESKYoung commented Jul 9, 2024

@abiosoft I'm on macOS, so don't have apt to check this.

In any case, the linked issue has raised a few points on this, and there's a pending PR to be backwards compatible with older API versions, so this may get resolved there instead!

@abiosoft
Copy link
Owner

abiosoft commented Jul 10, 2024

@abiosoft I'm on macOS, so don't have apt to check this.

You don't need apt, you are to run the command inside the colima VM.

@ESKYoung
Copy link
Author

Oh sorry, completely missed that!

Yes that works now, thanks for the assistance!

@abiosoft
Copy link
Owner

This has been fixed in latest release https://github.com/abiosoft/colima/releases/tag/v0.6.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants