Skip to content

Clarify how to resolve pushing a single platform from a multi-platform image index #5242

@ESKYoung

Description

@ESKYoung

Description

docker push note is unclear, and refers to an unknown docker convert command.

I'm running Lima on macOS to build linux/amd64 images, and this note appears for each push.

Might be more useful to explain how to resolve this, as it's unclear initially to me how to fix this. Looking back through the relevant PR, it states that it now expects a --platform flag when running docker pull or docker push.

Reproduce

  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 behavior

Would expect the note to at least state using the --platform flag, or if there is a system-wide workaround for this as well.

docker version

Client: Docker Engine - Community
 Version:           27.0.3
 API version:       1.46
 Go version:        go1.22.4
 Git commit:        7d4bcd863a
 Built:             Fri Jun 28 14:56:30 2024
 OS/Arch:           darwin/arm64
 Context:           lima-default

Server: Docker Engine - Community
 Engine:
  Version:          27.0.3
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       662f78c
  Built:            Sat Jun 29 00:02:23 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.18
  GitCommit:        ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc:
  Version:          1.7.18
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
 rootlesskit:
  Version:          2.0.2
  ApiVersion:       1.1.1
  NetworkDriver:    slirp4netns
  PortDriver:       builtin
  StateDir:         /run/user/502/dockerd-rootless
 slirp4netns:
  Version:          1.2.1
  GitCommit:        09e31e92fa3d2a1d3ca261adaeb012c8d75a8194

docker info

Client: Docker Engine - Community
 Version:    27.0.3
 Context:    lima-default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /Users/eric.young/.docker/cli-plugins/docker-buildx
WARNING: Plugin "/Users/eric.young/.docker/cli-plugins/docker-compose" is not valid: failed to fetch metadata: fork/exec /Users/eric.young/.docker/cli-plugins/docker-compose: no such file or directory

Server:
 Containers: 2
  Running: 0
  Paused: 0
  Stopped: 2
 Images: 2
 Server Version: 27.0.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: true
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  rootless
  cgroupns
 Kernel Version: 6.8.0-36-generic
 Operating System: Ubuntu 24.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 7.75GiB
 Name: lima-default
 ID: f9d1213f-d5db-4580-8a1f-0d87cdd1b665
 Docker Root Dir: /home/lima.linux/.local/share/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Additional Info

Note I have the following two Docker-related environment variables set in my ~/.zshrc:

export DOCKER_DEFAULT_PLATFORM=linux/amd64
export DOCKER_CONTEXT=lima-default

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions