gpio-webhook-server/Dockerfile

24 lines
482 B
Docker
Raw Permalink Normal View History

2020-05-11 16:28:37 +00:00
FROM alpine:latest as env
RUN apk --update add ca-certificates
2020-05-20 18:00:35 +00:00
RUN addgroup -S gpio-webhook && adduser -S gpio-webhook -G gpio-webhook
2020-05-11 16:28:37 +00:00
FROM golang:1.14 AS build
WORKDIR /src
COPY . /src/
2020-05-12 04:21:57 +00:00
RUN make build
2020-05-11 16:28:37 +00:00
FROM scratch
2020-05-11 16:28:37 +00:00
2020-05-20 18:00:35 +00:00
ENTRYPOINT ["/srv/gpio-webhook-server"]
USER gpio-webhook
EXPOSE 7200
2020-05-11 16:28:37 +00:00
COPY --from=env /etc/passwd /etc/group /etc/
2020-05-20 18:00:35 +00:00
COPY --from=build --chown=gpio-webhook /src/build/ /srv/
2020-05-11 16:28:37 +00:00
COPY --from=env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt