Open weidi opened 2 years ago
please provide steps how to invoke buildx to build arm (is it really arm64 ?) images
You can invoke buildx this way creating amd64, arm64 and armv7(rpi1-3) images
docker buildx build -t softethervpn/vpnserver:stable -f .\Dockerfile.stable --push --platform linux/amd64,linux/arm64,linux/arm/v7 .
I tried on Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
:
r$ docker buildx build -t softethervpn/vpnserver:stable -f Dockerfile.stable --push --platform linux/amd64,linux/arm64,linux/arm/v7 .
unknown shorthand flag: 't' in -t
See 'docker --help'.
...
nevermind, I've figured out how to invoke it
if I invoke like that docker build -f Dockerfile --platform linux/amd64 .
, I see
Step 11/27 : FROM builder-$TARGETARCH AS builder
invalid reference format
I picked build command from README ...
docker build -t softethevpn:latest .
Sending build context to Docker daemon 97.28kB
Step 1/27 : FROM alpine as base
---> d7d3d98c851f
Step 2/27 : ARG GIT_TAG=5.02.5180
---> Using cache
---> 1105e1a0e774
Step 3/27 : ARG TARGETPLATFORM
---> Using cache
---> b37b6da6ca22
Step 4/27 : ARG TARGETARCH
---> Using cache
---> 7688a88f9472
Step 5/27 : FROM base AS builder-amd64
---> 7688a88f9472
Step 6/27 : ENV TARGET_CONFIG_FLAGS ""
---> Using cache
---> 1975ce948d0d
Step 7/27 : FROM base AS builder-arm64
---> 7688a88f9472
Step 8/27 : ENV TARGET_CONFIG_FLAGS "--disable-sse2"
---> Using cache
---> ce734e35db7a
Step 9/27 : FROM base AS builder-arm
---> 7688a88f9472
Step 10/27 : ENV TARGET_CONFIG_FLAGS "--disable-sse2"
---> Using cache
---> ce734e35db7a
Step 11/27 : FROM builder-$TARGETARCH AS builder
invalid reference format
Reverted the implementation of different Target config flags in 88972aeb6896e1a0ec1695cdb8da0d10a1c9400b as this was just a try for a workaround.
I implemented a GitHub CI to try on a completely different platform but it seems that the buildx (qemu) ARM emulation has some drawbacks here. Still not sure on how to work around it
When using docker buildx to build multiarch images the arm builds are failing to build blake2. If building natively on arm (RaspberryPi) there is no issue so somethings funky with the way how buildx does ARM abstraction.