Skip to content

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.

2 participants