mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-13 03:52:55 +01:00
fix alpine version
This commit is contained in:
parent
7f8ce99ece
commit
e474a539bd
1 changed files with 8 additions and 6 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
ARG GOLANG_VERSION=1.16
|
ARG GOLANG_VERSION=1.16
|
||||||
|
# 3.14 presents challenges: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
|
||||||
|
ARG ALPINE_VERSION=3.14
|
||||||
|
|
||||||
## Kustomize
|
## Kustomize
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as kustomize
|
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_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/"
|
||||||
|
|
@ -13,12 +15,12 @@ RUN mkdir /src && cd /src; \
|
||||||
|
|
||||||
## Opm
|
## Opm
|
||||||
|
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as opm
|
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} as opm
|
||||||
|
|
||||||
ARG OPM_VERSION=1.19.0
|
ARG OPM_VERSION=1.19.0
|
||||||
ENV GOPROXY="https://proxy.golang.org/"
|
ENV GOPROXY="https://proxy.golang.org/"
|
||||||
|
|
||||||
RUN apk add --no-cache make gcc musl-dev curl
|
RUN apk add --no-cache make gcc musl-dev curl git
|
||||||
|
|
||||||
## on Alpine opm needs to be built from scratch due to glibc vs musl issues
|
## on Alpine opm needs to be built from scratch due to glibc vs musl issues
|
||||||
RUN mkdir -p /src \
|
RUN mkdir -p /src \
|
||||||
|
|
@ -30,7 +32,7 @@ RUN mkdir -p /src \
|
||||||
&& make bin/opm
|
&& make bin/opm
|
||||||
|
|
||||||
## Controller-gen
|
## Controller-gen
|
||||||
FROM golang:${GOLANG_VERSION}-alpine as controller-gen
|
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_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/"
|
||||||
|
|
@ -40,7 +42,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}-alpine${ALPINE_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."
|
||||||
|
|
@ -90,7 +92,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}-alpine${ALPINE_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