Skip to content

Commit

Permalink
add platform flag to Dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Sanders <jsand@google.com>
  • Loading branch information
Jake Sanders committed Nov 2, 2021
1 parent 8d92b37 commit 9705097
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
# limitations under the License.

ARG RUNTIME_IMAGE=gcr.io/distroless/base:debug
ARG TARGETPLATFORM

FROM $RUNTIME_IMAGE
FROM --platform=${TARGETPLATFORM} $RUNTIME_IMAGE

ARG ARCH
COPY cosign-linux-${ARCH} /bin/cosign
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.cosigned
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
# limitations under the License.

ARG RUNTIME_IMAGE=gcr.io/distroless/base:debug
ARG TARGETPLATFORM

FROM $RUNTIME_IMAGE
FROM --platform=${TARGETPLATFORM} $RUNTIME_IMAGE

ARG ARCH
COPY cosigned-linux-${ARCH} /bin/cosigned
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.sget
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
# limitations under the License.

ARG RUNTIME_IMAGE=gcr.io/distroless/base:debug
ARG TARGETPLATFORM

FROM $RUNTIME_IMAGE
FROM --platform=${TARGETPLATFORM} $RUNTIME_IMAGE

ARG ARCH
COPY sget-linux-${ARCH} /bin/sget
Expand Down

0 comments on commit 9705097

Please sign in to comment.