mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-11 02:52:56 +01:00
switch image base from alpine to debian
This commit is contained in:
parent
d837840867
commit
62ba2325f1
1 changed files with 8 additions and 6 deletions
|
|
@ -1,18 +1,18 @@
|
||||||
ARG GOLANG_VERSION=1.16
|
ARG GOLANG_VERSION=1.16
|
||||||
|
|
||||||
## Kustomize
|
## Kustomize
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as kustomize
|
FROM golang:${GOLANG_VERSION} as kustomize
|
||||||
|
|
||||||
ARG KUSTOMIZE_VERSION=3.8.10
|
ARG KUSTOMIZE_VERSION=3.8.10
|
||||||
ENV GOPROXY="https://proxy.golang.org/"
|
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; \
|
RUN mkdir /src && cd /src; \
|
||||||
go mod init tmp && \
|
go mod init tmp && \
|
||||||
go get sigs.k8s.io/kustomize/kustomize/v3@v${KUSTOMIZE_VERSION}
|
go get sigs.k8s.io/kustomize/kustomize/v3@v${KUSTOMIZE_VERSION}
|
||||||
|
|
||||||
## Controller-gen
|
## Controller-gen
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as controller-gen
|
FROM golang:${GOLANG_VERSION} as controller-gen
|
||||||
|
|
||||||
ARG CONTROLLER_GEN_VERSION=0.3.0
|
ARG CONTROLLER_GEN_VERSION=0.3.0
|
||||||
ENV GOPROXY="https://proxy.golang.org/"
|
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}
|
&& go get sigs.k8s.io/controller-tools/cmd/controller-gen@v${CONTROLLER_GEN_VERSION}
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as build
|
FROM golang:${GOLANG_VERSION} as build
|
||||||
|
|
||||||
LABEL maintainer="GitLab Distribution Team" \
|
LABEL maintainer="GitLab Distribution Team" \
|
||||||
description="Build base image for the GitLab Operator project."
|
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 YQ_VERSION=4.7.0
|
||||||
ARG HELM_VERSION=3.5.2
|
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 \
|
RUN go get -u \
|
||||||
github.com/onsi/ginkgo/ginkgo \
|
github.com/onsi/ginkgo/ginkgo \
|
||||||
golang.org/x/lint/golint
|
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
|
COPY --from=controller-gen /go/bin/controller-gen /usr/local/bin/controller-gen
|
||||||
|
|
||||||
## Final image
|
## Final image
|
||||||
FROM golang:${GOLANG_VERSION}-alpine
|
FROM golang:${GOLANG_VERSION}
|
||||||
LABEL maintainer="GitLab Distribution Team" \
|
LABEL maintainer="GitLab Distribution Team" \
|
||||||
description="Build base image for the GitLab Operator project."
|
description="Build base image for the GitLab Operator project."
|
||||||
COPY --from=build / /
|
COPY --from=build / /
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue