Skip to content

Commit

Permalink
Define GOARM variable in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Jun 5, 2022
1 parent 991fc02 commit aca28bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/golang:1.18.3-bullseye@s

ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT

WORKDIR /src/
COPY ./go.mod ./go.sum ./
RUN go mod download
COPY ./ ./
RUN make test
RUN make build GOOS="${TARGETOS-}" GOARCH="${TARGETARCH-}"
RUN make build \
GOOS="${TARGETOS-}" \
GOARCH="${TARGETARCH-}" \
GOARM="$([ "${TARGETARCH-}" != 'arm' ] || printf '%s' "${TARGETVARIANT#v}")"
RUN test -z "$(readelf -x .interp ./dist/cetusguard-* 2>/dev/null)"

##################################################
Expand Down

0 comments on commit aca28bf

Please sign in to comment.