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:
parent
e9bd4d10fc
commit
741a706811
@ -12,10 +12,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
ARG ARCH=amd64
|
|
||||||
|
|
||||||
FROM k8s.gcr.io/build-image/debian-base:buster-v1.6.0
|
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 nfsplugin from build _output directory
|
||||||
COPY bin/${ARCH}/nfsplugin /nfsplugin
|
COPY bin/${ARCH}/nfsplugin /nfsplugin
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -100,7 +100,7 @@ nfs:
|
|||||||
|
|
||||||
.PHONY: nfs-armv7
|
.PHONY: nfs-armv7
|
||||||
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
|
.PHONY: container-build
|
||||||
container-build:
|
container-build:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user