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

Run Docker Container with Custom User ID and Group ID for pipelines Folder Volume #175

Open
chris-wgg opened this issue Jul 26, 2024 · 0 comments

Comments

@chris-wgg
Copy link

Is your feature request related to a problem? Please describe.
When mounting the pipeline volume for pipelines, the scripts are owned by root. This can be problematic when I want to delete failed pipeline scripts and files within the Docker volume itself. Having root ownership restricts the ability to manage these files easily and can lead to permission issues.

Describe the solution you'd like
I would suggest running the Docker container with a custom User ID and Group ID. By specifying a non-root user, it will ensure that the files and folders created within the volume are owned by this user, thus avoiding permission issues and making it easier to manage the pipeline scripts from the host.

Additional context
To implement this feature, the Dockerfile should be modified to accept custom User ID and Group ID as build arguments, and the container should run with these IDs. Additionally, the Docker run command or script should be adjusted to use these custom IDs. This will improve security and ease of file management within the mounted volume.

Example Dockerfile changes, e.g.:

ARG USER_ID=1001
ARG GROUP_ID=1001

RUN groupadd -g ${GROUP_ID} custom_user && \
    useradd -m -u ${USER_ID} -g ${GROUP_ID} custom_user

USER custom_user

Implementing this feature will greatly enhance the usability and security of the Docker setup for document scanning processes. Thank you for considering this request.

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

No branches or pull requests

1 participant