From 62ba2325f15aced30f79c1e864ba02166b0c1d43 Mon Sep 17 00:00:00 2001 From: Dustin Collins Date: Tue, 2 Nov 2021 14:55:32 -0500 Subject: [PATCH] switch image base from alpine to debian --- Dockerfile.gitlab-operator-build-base | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile.gitlab-operator-build-base b/Dockerfile.gitlab-operator-build-base index 09a9e28..8ee8e3d 100644 --- a/Dockerfile.gitlab-operator-build-base +++ b/Dockerfile.gitlab-operator-build-base @@ -1,18 +1,18 @@ ARG GOLANG_VERSION=1.16 ## Kustomize -FROM golang:${GOLANG_VERSION}-alpine as kustomize +FROM golang:${GOLANG_VERSION} as kustomize ARG KUSTOMIZE_VERSION=3.8.10 ENV GOPROXY="https://proxy.golang.org/" -RUN apk add --no-cache gcc musl-dev +RUN apt-get update && apt-get install -y gcc && apt-get clean RUN mkdir /src && cd /src; \ go mod init tmp && \ go get sigs.k8s.io/kustomize/kustomize/v3@v${KUSTOMIZE_VERSION} ## Controller-gen -FROM golang:${GOLANG_VERSION}-alpine as controller-gen +FROM golang:${GOLANG_VERSION} as controller-gen ARG CONTROLLER_GEN_VERSION=0.3.0 ENV GOPROXY="https://proxy.golang.org/" @@ -22,7 +22,7 @@ RUN mkdir /src && cd /src; \ && go get sigs.k8s.io/controller-tools/cmd/controller-gen@v${CONTROLLER_GEN_VERSION} ## Build -FROM golang:${GOLANG_VERSION}-alpine as build +FROM golang:${GOLANG_VERSION} as build LABEL maintainer="GitLab Distribution Team" \ description="Build base image for the GitLab Operator project." @@ -33,7 +33,9 @@ ARG OPM_VERSION=1.19.1 ARG YQ_VERSION=4.7.0 ARG HELM_VERSION=3.5.2 -RUN apk add --no-cache podman buildah curl make gcc musl-dev git bash coreutils +RUN apt-get update && apt-get install -y \ + podman buildah curl make gcc git bash coreutils \ + && apt-get clean RUN go get -u \ github.com/onsi/ginkgo/ginkgo \ golang.org/x/lint/golint @@ -69,7 +71,7 @@ COPY --from=kustomize /go/bin/kustomize /usr/local/bin/kustomize COPY --from=controller-gen /go/bin/controller-gen /usr/local/bin/controller-gen ## Final image -FROM golang:${GOLANG_VERSION}-alpine +FROM golang:${GOLANG_VERSION} LABEL maintainer="GitLab Distribution Team" \ description="Build base image for the GitLab Operator project." COPY --from=build / /