Skip to content

Commit f2e600d

Browse files
Merge pull request #967 from arahja/add_non-root_user_to_containers
Added non-root user to docker images.
2 parents 6486db9 + c4d9e39 commit f2e600d

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ LABEL org.opencontainers.image.licenses="Apache-2.0, GPL-2.0"
99
LABEL org.opencontainers.image.title="ntfy"
1010
LABEL org.opencontainers.image.description="Send push notifications to your phone or desktop using PUT/POST"
1111

12-
RUN apk add --no-cache tzdata
12+
RUN apk add --no-cache tzdata \
13+
&& adduser -D -u 1000 ntfy
1314
COPY ntfy /usr/bin
1415

1516
EXPOSE 80/tcp

Dockerfile-arm

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ LABEL org.opencontainers.image.description="Send push notifications to your phon
1212
# Alpine does not support adding "tzdata" on ARM anymore, see
1313
# https://github.com/binwiederhier/ntfy/issues/894
1414

15+
RUN adduser -D -u 1000 ntfy
1516
COPY ntfy /usr/bin
1617

1718
EXPOSE 80/tcp

Dockerfile-build

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ LABEL org.opencontainers.image.licenses="Apache-2.0, GPL-2.0"
5353
LABEL org.opencontainers.image.title="ntfy"
5454
LABEL org.opencontainers.image.description="Send push notifications to your phone or desktop using PUT/POST"
5555

56+
RUN adduser -D -u 1000 ntfy
5657
COPY --from=builder /app/dist/ntfy_linux_server/ntfy /usr/bin/ntfy
5758

5859
EXPOSE 80/tcp

0 commit comments

Comments
 (0)