Open hemna opened 3 years ago
Not sure if you have fixed this issue. Because you added a new paramater --platform=$BUILDPLATFORM
and move to latest version already (node:19-alpine
)
But from my view, you don't have to nominate the platform when run the build on proper platform already.
FROM node:19-alpine as node
This image node:19-alpine
included multi-arch already.
(not sure why it missed linux/arm/v7
, but this is not related to current problem)
when docker build
on platform linux/arm/v6
, it will pull the image for that platform automatically.
If you stuck at begin, maybe you point to wrong platform with --platform=$BUILDPLATFORM
If you need build for multi-arch, use command docker buildx
, you can take the reference on this file I did
docker buildx build --no-cache --push \
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \
-t ${image}:latest -t ${image}:${VERSION} .
ref: https://github.com/alpine-docker/semver/blob/master/build.sh
Environment
I am trying to build the Dozzle project's Dockerfile on my Raspberry pi Zero W: https://github.com/amir20/dozzle/blob/master/Dockerfile
The raspizerow is a linux/arm/v6 platform, so I have modified the Dockerfile to use
Build assets
FROM node:current-alpine3.14 as node
Since node:current-alpine3.14 is listed as having an armv6 image in hub.docker.com here: https://hub.docker.com/layers/node/library/node/current-alpine3.14/images/sha256-bc838a6daf88a490c81c3a85e77c65f1580d0c736fe0bbab29e32583a76afbaf?context=explore
I pulled the image locally with: docker pull --platform=linux/arm/v6 node:current-alpine3.14
I can't even get past the first command in the Dockerfile, which is RUN apk update