Skip to content

Commit

Permalink
Merge pull request #51 from mgfritch/dockerfile-warn
Browse files Browse the repository at this point in the history
The 'as' keyword should match the case of the 'from' keyword
  • Loading branch information
mgfritch authored Aug 30, 2024
2 parents 7cd9e9d + f385ccc commit 45fdfc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
ARG BCI_IMAGE=registry.suse.com/bci/bci-busybox
ARG GO_IMAGE=rancher/hardened-build-base:v1.21.11b3
FROM ${BCI_IMAGE} as bci
FROM ${BCI_IMAGE} AS bci

# Image that provides cross compilation tooling.
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx

FROM --platform=$BUILDPLATFORM ${GO_IMAGE} as base-builder
FROM --platform=$BUILDPLATFORM ${GO_IMAGE} AS base-builder
# copy xx scripts to your build stage
COPY --from=xx / /
RUN apk add file make git clang lld
ARG TARGETPLATFORM
RUN set -x && \
xx-apk --no-cache add musl-dev gcc

FROM base-builder as whereabouts-builder
FROM base-builder AS whereabouts-builder
ARG TAG=v0.8.0
ARG PKG="github.com/k8snetworkplumbingwg/whereabouts"
ARG SRC="github.com/k8snetworkplumbingwg/whereabouts"
Expand All @@ -38,7 +38,7 @@ RUN go-assert-boring.sh bin/*
RUN xx-verify --static bin/*
RUN install bin/* /usr/local/bin

FROM ${GO_IMAGE} as strip_binary
FROM ${GO_IMAGE} AS strip_binary
#strip needs to run on TARGETPLATFORM, not BUILDPLATFORM
COPY --from=whereabouts-builder /usr/local/bin/whereabouts .
COPY --from=whereabouts-builder /usr/local/bin/ip-control-loop .
Expand Down

0 comments on commit 45fdfc8

Please sign in to comment.