Skip to content

Commit 35e06f3

Browse files
authored
fix: Make docker image to run as non-root. (#116)
1 parent 09555f3 commit 35e06f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ COPY --from=builder /usr/local/bin /usr/local/bin
3535
# Copy only the source code directory needed at runtime
3636
COPY --from=builder /app/src/stac_auth_proxy /app/src/stac_auth_proxy
3737

38+
39+
RUN useradd -m -u 1001 -s /bin/bash user && \
40+
chown -R user:user /app
41+
42+
USER user
43+
3844
ENV PYTHONPATH=/app/src
3945

4046
CMD ["python", "-m", "stac_auth_proxy"]

0 commit comments

Comments
 (0)