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

Can't build from Dockerfile on Docker 20.10.4 on Raspberry Pi #3

Open
webash opened this issue Apr 6, 2021 · 0 comments
Open

Can't build from Dockerfile on Docker 20.10.4 on Raspberry Pi #3

webash opened this issue Apr 6, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@webash
Copy link

webash commented Apr 6, 2021

Bug Report

Docker 20.10.4 appropriately reads the manifest of an image, which for the balenalib/armv7hf-alpine:latest erroneously reports linux/amd64 as its architecture. Thus attempting to manually run the build process for this repo/Dockerfile (while waiting for #2) results in the following warnings and final build problem:

docker-compose build flic-daemon
WARNING: Some networks were defined but are not used by any service: traefik_backend
Building flic-daemon
Step 1/16 : ARG ARCH_NAME=rpi
Step 2/16 : FROM balenalib/${ARCH_NAME}-alpine:latest
latest: Pulling from balenalib/armv7hf-alpine
f55b840e27d3: Already exists
402fc73d1261: Pull complete
1b87b7489741: Pull complete
ed14ceb62157: Pull complete
006276fa4414: Pull complete
7979890402ea: Pull complete
408933703be8: Pull complete
09604c85eac2: Pull complete
87d51f119897: Pull complete
Digest: sha256:b468ab88785f856d585c627c199b43663a40454c24947f23e6dd1319679c5823
Status: Downloaded newer image for balenalib/armv7hf-alpine:latest
 ---> f1fdb4e04d5e
Step 3/16 : ARG ARCH_NAME
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 761dd4a5ddd3
Removing intermediate container 761dd4a5ddd3
 ---> a4b5d8046b2f
Step 4/16 : ARG BUILD_DATE=1970-01-01T00:00:00Z
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in b6735fc48836
Removing intermediate container b6735fc48836
 ---> b40d0bb2f872
Step 5/16 : ARG FLICLIB_ARCH=unknown

 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 183a1037a433
Removing intermediate container 183a1037a433
 ---> 20ec2d11c6ba
Step 6/16 : ARG FLICLIB_VERSION=0.5
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 68db5f68999d
Removing intermediate container 68db5f68999d
 ---> 60b36343d703
Step 7/16 : ARG VCS_REF=0000000
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 34ca51ed1dba
Removing intermediate container 34ca51ed1dba
 ---> 17176c999e3f
Step 8/16 : ARG VERSION=0.5.3
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 79f55acf6688
Removing intermediate container 79f55acf6688
 ---> 5f92850f5e54
Step 9/16 : LABEL org.label-schema.build-date=${BUILD_DATE}       org.label-schema.description="Flic smart button bridge for single-board computers."       org.label-schema.docker.cmd="docker run --detach --restart=unless-stopped --net=host --cap-add=NET_ADMIN --name=flic renemarc/balena-flic"       org.label-schema.docker.cmd.debug="docker run -it --net=host --cap-add=NET_ADMIN flic bash"       org.label-schema.docker.cmd.help="docker run -it --rm --net=host --cap-add=NET_ADMIN renemarc/balena-flic flicd --help"       org.label-schema.name="balena Flic"       org.label-schema.url="https://flic.io/"       org.label-schema.vcs-ref=${VCS_REF}       org.label-schema.vcs-url="https://github.com/renemarc/balena-flic"       org.label-schema.version=${VERSION}       org.label-schema.schema-version="1.0"
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 89d95b9c6188
Removing intermediate container 89d95b9c6188
 ---> a9c10af95fbb
Step 10/16 : RUN ["cross-build-start"]
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
 ---> Running in 2a502e412cd5
standard_init_linux.go:219: exec user process caused: exec format error
ERROR: Service 'flic-daemon' failed to build: The command 'cross-build-start' returned a non-zero code: 1

Steps to Reproduce (unless obvious)

  1. Create docker-compose.yml with build statements:
    container_name: flic-daemon
    image: flic-daemon
    build:
      context: https://github.com/renemarc/balena-flic.git
      dockerfile: Dockerfile
      args:
        ARCH_NAME: armv7hf
    restart: unless-stopped
    network_mode: host
    cap_add:
      - NET_ADMIN
    
  2. Attempt a build: docker-compose build flic-daemon, get the above error messages

Environment Info

Raspberry Pi 4 running Raspberry Pi OS 32 bit and Docker 20.10.04

Suggested fix

More pressure on Balena to correct their image manifests so that they can run on the intended architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant