Merge pull request #982 from xmlking/master

go-micro docker now includes unprivileged user
This commit is contained in:
Milos Gajdos 2019-11-26 10:54:18 +00:00 committed by GitHub
commit 19f2f8b161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,13 @@
FROM golang:1.13-alpine
RUN mkdir /user && \
echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \
echo 'nobody:x:65534:' > /user/group
ENV GO111MODULE=on
RUN apk --no-cache add make git gcc libtool musl-dev
RUN apk --no-cache add make git gcc libtool musl-dev ca-certificates && \
rm -rf /var/cache/apk/* /tmp/*
WORKDIR /
COPY go.mod .
COPY go.sum .
COPY ./go.mod ./go.sum ./
RUN go mod download && rm go.mod go.sum