Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit b1af5ee

Browse files
fix: security issue regarding user
1 parent f9d6eeb commit b1af5ee

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

database/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
FROM mcr.microsoft.com/mssql-tools
22

3+
RUN useradd -m -s /bin/bash nonroot
4+
35
WORKDIR /database
46
COPY db-setup-entrypoint.sh /database/
5-
RUN chmod +x /database/db-setup-entrypoint.sh
6-
# USER mssql
7+
8+
RUN chmod +x /database/db-setup-entrypoint.sh && \
9+
chown -R nonroot:nonroot /database
10+
11+
USER nonroot
12+
713
ENTRYPOINT ["/database/db-setup-entrypoint.sh"]

0 commit comments

Comments
 (0)