2019-05-06 00:56:27 +00:00
|
|
|
FROM golang:1.11.5 as build
|
2019-07-11 02:33:22 +00:00
|
|
|
WORKDIR /go/src/github.com/mitchell/selfpass/services
|
2019-05-06 00:56:27 +00:00
|
|
|
COPY . .
|
2019-05-30 06:32:56 +00:00
|
|
|
ENV GO111MODULE on
|
2019-05-06 00:56:27 +00:00
|
|
|
RUN make build
|
|
|
|
|
2019-05-28 01:16:50 +00:00
|
|
|
FROM debian:stable-20190506-slim
|
2019-07-11 02:33:22 +00:00
|
|
|
COPY --from=build /go/src/github.com/mitchell/selfpass/services/bin/server /usr/bin/server
|
2019-05-30 06:32:56 +00:00
|
|
|
RUN groupadd -r selfpass && useradd --no-log-init -r -g selfpass selfpass
|
|
|
|
USER selfpass
|
|
|
|
WORKDIR /home/selfpass
|
2019-05-22 15:22:40 +00:00
|
|
|
ENTRYPOINT ["server"]
|
2019-05-06 00:56:27 +00:00
|
|
|
EXPOSE 8080
|