-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile platform specification
- Loading branch information
Showing
4 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,9 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
|
||
|
@@ -86,7 +86,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
&& mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer "${MAINTAINER}" | ||
|
||
ENV APP_NAME mirror | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,9 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
|
||
|
@@ -87,7 +87,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
RUN cp sample.yaml /tmp/config.yaml | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME readreplica-rotate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,9 @@ ARG DISTROLESS_IMAGE_TAG=nonroot | |
ARG UPX_OPTIONS=-9 | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG UPX_OPTIONS | ||
ARG ZLIB_VERSION | ||
|
@@ -117,7 +117,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
RUN cp sample.yaml /tmp/config.yaml | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME job | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ ARG DISTROLESS_IMAGE_TAG=nonroot | |
ARG UPX_OPTIONS=-9 | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
|
||
|
@@ -92,7 +92,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
RUN cp sample.yaml /tmp/config.yaml | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
ENV APP_NAME operator | ||
|
||
|