Skip to content

Commit 8907cff

Browse files
authored
Merge pull request #15 from thiagodsti/chore/add-non-root-user-for-dockerfile
chore: Add non root user for Dockerfile
2 parents 4a6446c + 190258a commit 8907cff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ ENV VITE_CLICKHOUSE_URL=""
3939
ENV VITE_CLICKHOUSE_USER=""
4040
ENV VITE_CLICKHOUSE_PASS=""
4141

42+
RUN addgroup -S ch-group -g 1001 && adduser -S ch-user -u 1001 -G ch-group
43+
44+
RUN chown -R ch-user:ch-group /app
45+
4246
# Use a shell script to inject environment variables and then serve the app
4347
CMD ["/bin/sh", "-c", "node inject-env.js && serve -s -l 5521"]

0 commit comments

Comments
 (0)