blob: 7881eba9e5ba0cecbf710bd9e7b8056c2add932a [file] [log] [blame]
FROM golang:1.14.2-alpine3.11
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/bin \
PATH=/cache/$PROJECT/Linux/x86_64/bin:${PATH}
WORKDIR /workspace
RUN apk add --update --no-cache \
bash \
build-base \
ca-certificates \
curl \
git \
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