Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added user service to Dockerfile so it run as non-root user #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brosano
Copy link

@brosano brosano commented Dec 20, 2023

This adds the necessary modifications to the Dockerfile to ensure that the application runs as a non-root user. The changes include the creation of a non-privileged user, setting appropriate permissions, and adjusting the Dockerfile accordingly.

@@ -1,6 +1,8 @@
FROM swaggerapi/swagger-ui:v5.9.1 AS swagger-ui
FROM python:3.10-slim

RUN useradd -m service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This maps to an arbitrary user id that may or may not exist on the Docker host, right? So if you want asr to, for example, cache models in mounted volumes (mounted to host folders), those folders on the host would need to be owned by the same user id and have proper permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants