compose: Docker-compose V2 for aarch64 doesn't find local images
Description
When running docker-compose build using version 2 on an arm64 machine, the Dockerfile being built does not find local images.
Steps to reproduce the issue:
- Create A.Dockerfile
FROM alpine:3.14
RUN echo "base image" > /docker-compose-v2-is-broken.txt
- Create B.Dockerfile
FROM my-org/my-base-image
RUN cat /docker-compose-is-broken.txt
- Create docker-compose.yml
version: "3.8"
services:
service-a:
image: my-org/my-base-image
build:
context: .
dockerfile: ./A.Dockerfile
service-b:
image: my-org/my-specific-image
build:
context: .
dockerfile: ./B.Dockerfile
- run
docker-compose build service-a && docker-compose build service-b.
Describe the results you received:
[root@ip-10-40-0-60 docker-compose-bug]# docker-compose build service-b
[+] Building 0.8s (3/3) FINISHED
=> [internal] load build definition from B.Dockerfile 0.0s
=> => transferring dockerfile: 104B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/my-org/my-base-image:latest 0.7s
------
> [internal] load metadata for docker.io/my-org/my-base-image:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Describe the results you expected:
my-org/my-base-image should be loaded from the local repository of images built. This work fine on a x86 computer.
Additional information you deem important (e.g. issue happens only occasionally):
Issue only happens on aarch64 binary of docker-compose
Output of docker compose version:
Docker Compose version v2.0.1
Output of docker info:
Client:
Context: default
Debug Mode: false
Server:
Containers: 26
Running: 1
Paused: 0
Stopped: 25
Images: 136
Server Version: 20.10.7
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
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: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc version: %runc_commit
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.246-187.474.amzn2.aarch64
Operating System: Amazon Linux 2
OSType: linux
Architecture: aarch64
CPUs: 2
Total Memory: 7.754GiB
Name: ip-10-40-0-60.eu-west-1.compute.internal
ID: M3FZ:TIBF:74OL:XW2V:HNU5:T5AQ:7Y2E:LHMB:4XNV:AKCA:ANZJ:D4WP
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details:
EC2 instance t4g on AWS.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 15 (4 by maintainers)
Do you have the same issue running
DOCKER_BUILDKIT=1 docker build -f A.Dockerfile . && docker build -f B.Dockerfile .? (in such case, this is a buildkit issue)Compose v2.1.x allows to use the “classic” docker builder, by disabling buildkit (
DOCKER_BUILDKIT=0), could you please give it a try?