Compare commits
No commits in common. "0f5ddbed7196013da636ffd688a91d3dc1e0f3a4" and "c5c66efbd71c85b3a8b2de1a3d148fecef1febbc" have entirely different histories.
0f5ddbed71
...
c5c66efbd7
|
@ -1,28 +1,36 @@
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env
|
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
|
||||||
|
|
||||||
ARG NTFY_VERSION
|
ARG NTFY_VERSION
|
||||||
|
|
||||||
RUN apk --no-cache add build-base git nodejs npm upx py3-pip \
|
#Build deps
|
||||||
&& go install github.com/goreleaser/goreleaser@latest \
|
RUN apk --no-cache add build-base git nodejs npm upx py3-pip
|
||||||
&& git clone --depth=1 -b "${NTFY_VERSION}" https://github.com/binwiederhier/ntfy.git /ntfybuild
|
|
||||||
WORKDIR /ntfybuild
|
#Install gorealeaser
|
||||||
RUN make web && make docs && make cli-linux-amd64
|
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
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.17
|
FROM docker.io/library/alpine:3.17
|
||||||
LABEL maintainer="contact@garbaye.fr"
|
LABEL maintainer="contact@garbaye.fr"
|
||||||
|
|
||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata \
|
RUN apk add --no-cache tzdata && \
|
||||||
&& adduser -S -H -D ntfy \
|
adduser \
|
||||||
&& mkdir /etc/ntfy \
|
-S -H -D \
|
||||||
&& chown ntfy:nogroup /etc/ntfy \
|
ntfy && \
|
||||||
&& mkdir /var/cache/ntfy \
|
mkdir /etc/ntfy && \
|
||||||
&& chown ntfy:nogroup /var/cache/ntfy
|
chown ntfy:nogroup /etc/ntfy && \
|
||||||
|
mkdir /var/cache/ntfy && \
|
||||||
|
chown ntfy:nogroup /var/cache/ntfy
|
||||||
|
|
||||||
USER ntfy
|
USER ntfy
|
||||||
|
|
||||||
ENTRYPOINT ["ntfy"]
|
ENTRYPOINT ["ntfy"]
|
||||||
|
|
||||||
COPY --from=build-env /ntfybuild/dist/ntfy_linux_amd64_linux_amd64_v1/ntfy /usr/bin/ntfy
|
COPY --from=build-env /go/ntfy/dist/ntfy_linux_amd64_linux_amd64_v1/ntfy /usr/bin/ntfy
|
||||||
|
|
Loading…
Reference in a new issue