24 lines
482 B
Docker
24 lines
482 B
Docker
FROM alpine:latest as env
|
|
|
|
RUN apk --update add ca-certificates
|
|
RUN addgroup -S gpio-webhook && adduser -S gpio-webhook -G gpio-webhook
|
|
|
|
|
|
FROM golang:1.14 AS build
|
|
|
|
WORKDIR /src
|
|
COPY . /src/
|
|
RUN make build
|
|
|
|
|
|
FROM scratch
|
|
|
|
ENTRYPOINT ["/srv/gpio-webhook-server"]
|
|
USER gpio-webhook
|
|
EXPOSE 7200
|
|
|
|
COPY --from=env /etc/passwd /etc/group /etc/
|
|
COPY --from=build --chown=gpio-webhook /src/build/ /srv/
|
|
COPY --from=env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|