github.com/vicanso/pike@v1.0.1-0.20210630235453-9099e041f6ec/Dockerfile (about) 1 FROM golang:1.16-alpine as builder 2 3 COPY ./ /pike 4 5 RUN apk update \ 6 && apk add git make \ 7 && cd /pike \ 8 && env \ 9 && make cp-asset \ 10 && CGO_ENABLED=0 make build 11 12 FROM alpine:3.13 13 14 COPY --from=builder /pike/pike /usr/local/bin/pike 15 COPY --from=builder /pike/entrypoint.sh /usr/local/bin/entrypoint.sh 16 17 RUN addgroup -g 1000 pike \ 18 && adduser -u 1000 -G pike -s /bin/sh -D pike \ 19 && chmod +x /usr/local/bin/entrypoint.sh \ 20 && apk add --no-cache ca-certificates 21 22 23 USER pike 24 25 WORKDIR /home/pike 26 27 CMD ["pike"] 28 29 ENTRYPOINT ["entrypoint.sh"]