Add go-task to GitLab Operator build base image

This commit is contained in:
Mitchell Nielsen 2022-07-04 06:19:53 +00:00 committed by Balasankar 'Balu' C
parent 345189653e
commit 088a7d14f5

View file

@ -54,6 +54,7 @@ ARG KUBEBUILDER_VERSION=3.2.0
ARG YQ_VERSION=4.7.0
ARG HELM_VERSION=3.5.2
ARG OPERATORSDK_VERSION=1.14.0
ARG TASK_VERSION=3.12.1
# ARG OPM_VERSION=1.19.0
RUN apk add --no-cache podman buildah curl make gcc musl-dev git bash coreutils
@ -97,6 +98,14 @@ COPY --from=kustomize /go/bin/kustomize /usr/local/bin/kustomize
# Controller-gen
COPY --from=controller-gen /go/bin/controller-gen /usr/local/bin/controller-gen
# Task
RUN curl --retry 6 -Ls https://github.com/go-task/task/releases/download/v${TASK_VERSION}/task_linux_amd64.tar.gz | tar -xz -C /tmp/ \
&& chmod +x /tmp/task \
&& mv /tmp/task /usr/local/bin/task
# Clean up temporary installation files
RUN rm -rf /tmp/*
## Final image
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION}
LABEL maintainer="GitLab Distribution Team" \