Re-add unprivileged user to Dockerfile

This commit is contained in:
spikecodes 2021-04-01 12:09:08 -07:00
parent 46dbd88d91
commit c23d2dc50b
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
2 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ name = "libreddit"
description = " Alternative private front-end to Reddit"
license = "AGPL-3.0"
repository = "https://github.com/spikecodes/libreddit"
version = "0.8.3"
version = "0.8.4"
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
edition = "2018"

View File

@ -7,6 +7,9 @@ RUN cargo install --path .
FROM alpine:latest
RUN apk add --no-cache curl
COPY --from=builder /usr/local/cargo/bin/libreddit /usr/local/bin/libreddit
RUN adduser --system --home /nonexistent --no-create-home --disabled-password libreddit
USER libreddit
EXPOSE 8080
HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost:8080/settings || exit 1
CMD ["libreddit"]