urizen/Dockerfile
2020-07-16 06:24:19 +00:00

24 lines
478 B
Docker

### Build phase
FROM golang:1.14 AS build
WORKDIR /src
RUN useradd -u 1794 urizen
COPY . /src/
RUN make build
### CA Certificates
FROM alpine:latest as certs
RUN apk --update add ca-certificates
### Final container image
FROM scratch
WORKDIR /srv
ENTRYPOINT ["/srv/urizen"]
COPY --from=build /etc/passwd /etc/group /etc/
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
USER urizen
COPY --from=build --chown=urizen /src/build/ /srv/