🔒️(summary) run image as a non-root user
Based on @rouja's comment, this is a bad practice, running a docker image as root. Added a User instruction with a default non-root user.
This commit is contained in:
committed by
aleb_the_flash
parent
bb30f25953
commit
b12b14b277
@@ -13,5 +13,8 @@ WORKDIR /app
|
||||
COPY --from=builder /usr/local /usr/local
|
||||
COPY ./summary /app/summary
|
||||
|
||||
# Un-privileged user running the application
|
||||
ARG DOCKER_USER=1000:1000
|
||||
USER ${DOCKER_USER}
|
||||
|
||||
CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
Reference in New Issue
Block a user