blob: 444620eb41fea3ed65a1578d63f3e48d0e9650ae [file] [log] [blame]
FROM golang:1.16.4-alpine3.12
ARG PROJECT
ARG GO_MODULE
ENV \
CACHE_BASE=/cache/$PROJECT \
GO111MODULE=on \
GOPRIVATE=$GO_MODULE \
GOPATH=/cache/$PROJECT/Linux/x86_64/go \
GOBIN=/cache/$PROJECT/Linux/x86_64/gobin \
PATH=/cache/$PROJECT/Linux/x86_64/gobin:/cache/$PROJECT/Linux/x86_64/bin:${PATH}
WORKDIR /workspace
RUN apk add --update --no-cache \
bash \
build-base \
ca-certificates \
curl \
git \
openssh-client \
unzip \
wget && \
rm -rf /var/cache/apk/*
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk && \
apk add --no-cache glibc-2.31-r0.apk && \
rm -rf /var/cache/apk/*
COPY go.mod go.sum /workspace/
RUN go mod download
COPY make /workspace/make
COPY Makefile /workspace/
RUN make dockerdeps