services-garbaye/podman-ntfy/docker/Dockerfile

36 lines
780 B
Docker
Raw Normal View History

2022-11-15 18:16:59 +00:00
#Build stage
2022-11-15 18:18:40 +00:00
FROM docker.io/library/golang:1.19-alpine3.16 AS build-env
2022-11-15 18:16:59 +00:00
ARG NTFY_VERSION
#Build deps
RUN apk --no-cache add build-base git nodejs npm upx py3-pip
#Install gorealeaser
RUN go install github.com/goreleaser/goreleaser@latest
#Setup repo
RUN git clone --depth=1 -b "${NTFY_VERSION}" https://github.com/binwiederhier/ntfy.git
#Build
RUN cd ntfy && make web && make docs && make cli-linux-amd64
2022-11-15 18:18:40 +00:00
FROM docker.io/library/alpine:3.16
2022-11-15 18:16:59 +00:00
LABEL maintainer="contact@garbaye.fr"
EXPOSE 80/tcp
RUN adduser \
-S -H -D \
ntfy && \
mkdir /etc/ntfy && \
chown ntfy:nogroup /etc/ntfy && \
mkdir /var/cache/ntfy && \
chown ntfy:nogroup /var/cache/ntfy
USER ntfy
ENTRYPOINT ["ntfy"]
COPY --from=build-env /go/ntfy/dist/ntfy_linux_amd64_linux_amd64_v1/ntfy /usr/bin/ntfy