Refactored Docker and Make files; increased command context timeouts;

add dockerignore
This commit is contained in:
Mitchell 2019-05-29 23:32:56 -07:00
parent db246df3d6
commit b76d5dffa3
7 changed files with 34 additions and 15 deletions

View file

@ -1,12 +1,13 @@
FROM golang:1.11.5 as build
WORKDIR /go/src/github.com/mitchell/selfpass
COPY . .
ENV GO111MODULE=on
RUN make gen-certs-go
ENV GO111MODULE on
RUN make build
FROM debian:stable-20190506-slim
WORKDIR /usr/bin
COPY --from=build /go/src/github.com/mitchell/selfpass/bin/server .
COPY --from=build /go/src/github.com/mitchell/selfpass/bin/server /usr/bin/server
RUN groupadd -r selfpass && useradd --no-log-init -r -g selfpass selfpass
USER selfpass
WORKDIR /home/selfpass
ENTRYPOINT ["server"]
EXPOSE 8080