Skip to content

Commit 32f35dc

Browse files
committed
Fix armv7 docker builds
Moves the ARCH build argument after the first FROM so it has the proper value. (https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact) Adds the GOARM=7 option to the armv7 GO build. Fixes #239
1 parent e9bd4d1 commit 32f35dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG ARCH=amd64
16-
1715
FROM k8s.gcr.io/build-image/debian-base:buster-v1.6.0
1816

17+
ARG ARCH=amd64
18+
1919
# Copy nfsplugin from build _output directory
2020
COPY bin/${ARCH}/nfsplugin /nfsplugin
2121

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ nfs:
100100

101101
.PHONY: nfs-armv7
102102
nfs-armv7:
103-
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/arm/v7/nfsplugin ./cmd/nfsplugin
103+
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
104104

105105
.PHONY: container-build
106106
container-build:

0 commit comments

Comments
 (0)