Skip modify of user/group when PUID/GUID not changed #1541
No reviewers
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#1541
Loading…
Reference in New Issue
No description provided.
Delete Branch "rocktop/api:no_root"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With this change, the API container will now run as the non-root user vikunja.
If you need to change the PUID and/or PGID of the user, you must restart the container and run it as root, e.g.:
docker run -e PGID=1012 -e PUID=1012 --user 0 -v /tmp/vikunja-api-dev-files:/app/vikunja/files vikunja/api:dev
Looks like this does not work.
Running the container with
gives me
and Vikunja still runs as root.
You need to set the user when you run the command.
docker run -e PGID=1000 -e PUID=1000 --user vikunja ...
or
docker run -e PGID=1000 -e PUID=1000 --user 1000 ...
Can you change it so that passing the user won't be required?
Added.
@ -42,2 +42,4 @@
COPY --from=builder /build/vikunja-* vikunja
USER vikunja
That will break the dynamic uid switching because the
vikunja
user does not have permission to do that. You need to change this in the entrypoint script.Dynamic uid switching is only possible as root. If you want to keep it, the default user has to remain root (this change gets reverted). Therefore, the opt-in of
--user vikunja
will be required if you want to run as non-root.Dynamic UID switching should still be possible.
Please revert this and add a comment to the docs about how to run the api rootless.
40ed6bfba7
to51b73e0463
@ -108,2 +108,4 @@
</div>
<div class="notification is-info">
<b>NOTE:</b> The API image supports running as the non-root user vikunja as long as PUID/PGUID are static. A modification to docker-compose is required.
Nice!
Can you add the same note to these two other places as well? https://kolaente.dev/vikunja/api/src/branch/main/docs/content/doc/setup/install-backend.md and https://kolaente.dev/vikunja/api/src/branch/main/docs/content/doc/setup/full-docker-example.md
hey @rocktop are you still interested in this?
Closing this due to inactivity. Please ping if you want to pick it up again.
Pull request closed