Fix armv7 docker builds

Moves the ARCH build argument after the first FROM so it has the proper
value. Default value is empty as required by release-tools/build.make.
(https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact)

Adds the GOARM=7 option to the armv7 GO build.
This commit is contained in:
G. Roggemans 2021-11-01 10:23:31 +01:00
parent e9bd4d10fc
commit 741a706811
2 changed files with 4 additions and 3 deletions

View File

@ -12,10 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ARG ARCH=amd64
FROM k8s.gcr.io/build-image/debian-base:buster-v1.6.0
# Architecture for bin folder
ARG ARCH
# Copy nfsplugin from build _output directory
COPY bin/${ARCH}/nfsplugin /nfsplugin

View File

@ -100,7 +100,7 @@ nfs:
.PHONY: nfs-armv7
nfs-armv7:
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/arm/v7/nfsplugin ./cmd/nfsplugin
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/arm/v7/nfsplugin ./cmd/nfsplugin
.PHONY: container-build
container-build: