forked from bufbuild/buf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.workspace
36 lines (30 loc) · 904 Bytes
/
Dockerfile.workspace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:1.22-alpine3.19
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.35-r1/glibc-2.35-r1.apk && \
apk add --no-cache glibc-2.35-r1.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