FROM golang:1.14 AS dependencies ARG KUBEBUILDER_VERSION=2.3.1 ARG YQ_VERSION=2.4.1 RUN curl -L https://go.kubebuilder.io/dl/${KUBEBUILDER_VERSION}/linux/amd64 | tar -xz -C /tmp/ \ && mv /tmp/kubebuilder_${KUBEBUILDER_VERSION}_linux_amd64 /usr/local/kubebuilder \ && ln -sfv /usr/local/kubebuilder/bin/* /usr/local/bin RUN curl --retry 6 -LsO https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \ && chmod +x yq_linux_amd64 \ && mv yq_linux_amd64 /usr/local/bin/yq FROM golang:1.14-alpine LABEL maintainer="GitLab Distribution Team" \ description="Build base image for the GitLab Operator project." COPY --from=dependencies /go /go COPY --from=dependencies /usr/local/kubebuilder /usr/local/kubebuilder COPY --from=dependencies /usr/local/bin/ /usr/local/bin/ COPY --from=dependencies /usr/local/bin/yq /usr/local/bin/yq RUN apk add --no-cache git \ && go get -u \ github.com/onsi/ginkgo/ginkgo \ golang.org/x/lint/golint \