2019-11-19 18:50:31 +02:00
|
|
|
FROM golang:1.13-alpine
|
2019-11-26 04:42:24 +02:00
|
|
|
|
|
|
|
RUN mkdir /user && \
|
|
|
|
echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \
|
|
|
|
echo 'nobody:x:65534:' > /user/group
|
|
|
|
|
2019-11-19 18:50:31 +02:00
|
|
|
ENV GO111MODULE=on
|
2020-02-29 23:55:15 +02:00
|
|
|
RUN apk --no-cache add make git gcc libtool musl-dev ca-certificates dumb-init && \
|
2019-11-26 04:42:24 +02:00
|
|
|
rm -rf /var/cache/apk/* /tmp/*
|
|
|
|
|
2019-11-19 18:50:31 +02:00
|
|
|
WORKDIR /
|
2019-11-26 04:42:24 +02:00
|
|
|
COPY ./go.mod ./go.sum ./
|
2019-11-21 19:31:13 +02:00
|
|
|
RUN go mod download && rm go.mod go.sum
|