-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Investigate component build error (#2341)
* fix: export config Signed-off-by: hlts2 <[email protected]> * fix: disable build cache Signed-off-by: hlts2 <[email protected]> * fix: platform kind Signed-off-by: hlts2 <[email protected]> * Revert "fix: disable build cache" This reverts commit 5ae9765. * Revert "fix: export config" This reverts commit ee8b964. * fix: delete gcc Signed-off-by: hlts2 <[email protected]> * fix: BUILDPLATFORM to TARGETPLATFORM Signed-off-by: hlts2 <[email protected]> --------- Signed-off-by: hlts2 <[email protected]>
- Loading branch information
Showing
18 changed files
with
36 additions
and
72 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,7 +19,7 @@ | |
# ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -52,15 +52,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
intel-mkl \ | ||
unzip \ | ||
upx \ | ||
&& if [ "${TARGETARCH}" = "amd64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${XARCH}-${TARGETOS}-gnu; \ | ||
export CC=${XARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
elif [ "${TARGETARCH}" = "arm64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${AARCH}-${TARGETOS}-gnu; \ | ||
export CC=${AARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
fi \ | ||
&& ldconfig \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
@@ -117,7 +108,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 --platform=${BUILDPLATFORM} ubuntu:devel | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME faiss | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
ARG TARGETOS | ||
|
@@ -54,15 +54,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
libopenblas-dev \ | ||
unzip \ | ||
upx \ | ||
&& if [ "${TARGETARCH}" = "amd64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${XARCH}-${TARGETOS}-gnu; \ | ||
export CC=${XARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
elif [ "${TARGETARCH}" = "arm64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${AARCH}-${TARGETOS}-gnu; \ | ||
export CC=${AARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
fi \ | ||
&& ldconfig \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
@@ -118,7 +109,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME ngt | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -94,7 +94,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
make GOARCH=${TARGETARCH} GOOS=${TARGETOS} REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
&& mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" | ||
|
||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME sidecar | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ARG GO_VERSION | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
# skipcq: DOK-DL3026 | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ARG GO_VERSION | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -94,7 +94,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME discoverer | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME filter | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME lb | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -92,7 +92,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | |
make GOARCH=${TARGETARCH} GOOS=${TARGETOS} REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
&& mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" | ||
|
||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${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 |
---|---|---|
|
@@ -19,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME index-correction | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME index-creation | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${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 |
---|---|---|
|
@@ -19,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME index-save | ||
|
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,7 +19,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -93,7 +93,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME index | ||
|
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 |
---|---|---|
|
@@ -25,8 +25,8 @@ ARG VALD_HELM_OPERATOR_KIND="ValdHelmOperatorRelease" | |
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
# skipcq: DOK-DL3026 | ||
FROM --platform=${BUILDPLATFORM} quay.io/operator-framework/helm-operator:${OPERATOR_SDK_VERSION} AS operator | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} quay.io/operator-framework/helm-operator:${OPERATOR_SDK_VERSION} AS operator | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG OPERATOR_SDK_VERSION | ||
|
@@ -64,15 +64,6 @@ RUN apt-get clean \ | |
curl \ | ||
upx \ | ||
git \ | ||
&& if [ "${TARGETARCH}" = "amd64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${XARCH}-${TARGETOS}-gnu; \ | ||
export CC=${XARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
elif [ "${TARGETARCH}" = "arm64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${AARCH}-${TARGETOS}-gnu; \ | ||
export CC=${AARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
fi \ | ||
&& ldconfig \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
|
@@ -145,7 +136,7 @@ COPY --from=operator /usr/local/bin/${APP_NAME} /usr/bin/${APP_NAME} | |
|
||
RUN upx ${UPX_OPTIONS} "/usr/bin/${APP_NAME}" | ||
|
||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME helm-operator | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ ARG DISTROLESS_IMAGE_TAG=nonroot | |
ARG UPX_OPTIONS=-9 | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG UPX_OPTIONS | ||
|
@@ -56,15 +56,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
upx \ | ||
g++ \ | ||
git \ | ||
&& if [ "${TARGETARCH}" = "amd64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${XARCH}-${TARGETOS}-gnu; \ | ||
export CC=${XARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
elif [ "${TARGETARCH}" = "arm64" ] ; then \ | ||
apt-get install -y --no-install-recommends --fix-missing gcc-${AARCH}-${TARGETOS}-gnu; \ | ||
export CC=${AARCH}-${TARGETOS}-gnu-gcc; \ | ||
export CC_FOR_TARGET=${CC}; \ | ||
fi \ | ||
&& ldconfig \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
|
@@ -134,7 +125,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${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 |
---|---|---|
|
@@ -20,7 +20,7 @@ ARG DISTROLESS_IMAGE_TAG=nonroot | |
ARG UPX_OPTIONS=-9 | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -96,7 +96,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 --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
ENV APP_NAME operator | ||
|
||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG GO_VERSION | ||
ARG TARGETARCH | ||
|
@@ -118,9 +118,9 @@ RUN GO_VERSION="$(< GO_VERSION)" \ | |
&& upx -9 -o "/usr/bin/${APP_NAME}" "${APP_NAME}" | ||
|
||
# Start From Scratch For Running Environment | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel | ||
FROM --platform=${TARGETPLATFORM} ubuntu:devel | ||
# Start From Alpine For Debug Environment | ||
# FROM --platform=${BUILDPLATFORM} alpine:latest | ||
# FROM --platform=${TARGETPLATFORM} alpine:latest | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME loadtest | ||
|