Skip to content

DOCKER_DEFAULT_PLATFORM not working for docker compose #9889

Closed
@userlerueda

Description

@userlerueda

Description

DOKCER_DEFAULT_PLATFORM is being ignored by the docker compose command.

Steps to reproduce the issue:

  1. DOCKER_DEFAULT_PLATFORM=linux/amd64 docker compose up --build
  2. Observe the error

Describe the results you received:

docker-compose up --build                                                                                                                                  
[+] Running 0/1
 ⠇ db Pulling                                                                                                                                                                                                 3.8s
no matching manifest for linux/arm64/v8 in the manifest list entries

Describe the results you expected:

The image should be pulled like it is done, for instance with a docker pull mysql:5.7

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.10.2

I installed docker-compose v2.11.2 also, but it only replaces the version for docker-compose -v

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.10.2)
  extension: Manages Docker extensions (Docker Inc., v0.2.9)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.19.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 63
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.124-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 5
 Total Memory: 5.785GiB
 Name: docker-desktop
 ID: DLSG:X5DC:AYNC:RWO6:XDP5:GCNB:PY32:MLOF:IMN2:S5BR:PP3C:G55Q
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 51
  Goroutines: 56
  System Time: 2022-09-29T23:21:25.49214843Z
  EventsListeners: 6
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false 

Additional environment details:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions