Tobias Brenner
Tobias Brenner

Reputation: 55

Build Dockerfile on Rasperry Pi OS

I am trying to build a Dockerfile on my Raspberry Pi 4 (Pi OS 10 (buster), armv7l).

I am using docker buildx build . which starts fine but runs into problems fetching packages:

[build 3/5] RUN apk --no-cache add git build-base:
#6 0.673 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
#6 0.735 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: temporary error (try again later)
#6 0.735 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
#6 0.737 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: temporary error (try again later)
#6 0.737 ERROR: unable to select packages:
#6 0.739 build-base (no such package):
#6 0.739 required by: world[build-base]
#6 0.739 git (no such package):
#6 0.739 required by: world[git]

This feels like the apk command is missing a connection, so I guess there might be something I am missing regarding an internet connection for the container (though the previous steps are working fine...)

This is the start of the Dockerfile I am trying to build:

# Build container
ARG GOVERSION=1.17.3
FROM --platform=${BUILDPLATFORM} \
    golang:$GOVERSION-alpine AS build

WORKDIR /src
RUN apk --no-cache add git build-base

Any ideas?

Upvotes: 1

Views: 289

Answers (1)

Tobias Brenner
Tobias Brenner

Reputation: 55

After a lot of research, I found the cause of my problem: It is due to a bug in the libseccomp2 library (dependency of Docker itself), which is fixed. However it's not pushed to all the repositories, which is affecting 32 bit installs of distros based on Debian Buster.

I had to follow one of the solution posted here, which fixed it.

Upvotes: 1

Related Questions