Skip to content

Commit

Permalink
feat: use non root user for Dockerfile
Browse files Browse the repository at this point in the history
fixes #51
  • Loading branch information
mr-karan committed Nov 9, 2022
1 parent bcae727 commit 10f74c3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get -y update && apt install -y ca-certificates

WORKDIR /app

COPY calert.bin .
COPY static/ /app/static/
COPY config.sample.toml config.toml

ARG CALERT_GID="999"
ARG CALERT_UID="999"

RUN addgroup --system --gid $CALERT_GID calert && \
adduser --uid $CALERT_UID --system --ingroup calert calert && \
chown -R calert:calert /app

USER calert
EXPOSE 6000

ENTRYPOINT [ "./calert.bin" ]

0 comments on commit 10f74c3

Please sign in to comment.