services-garbaye/podman-ntfy/container/Containerfile

29 lines
795 B
Plaintext
Raw Normal View History

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