mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
🐛 Bug Report: Scripts inside /app/scripts/docker are non-executable #306
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Originally created by @MrRubberDucky on GitHub.
Reproduction steps
I realize there's a way to do it via PGID and PUID, though I'm personally not a fan of such workaround as it uses
su-execunder the hood. That's why I wanted to execute the entrypoint script directly, for now I work around this issue by mounting entrypoint script over/sbin/su-execand that works.Not sure if oversight, or intentional since I can see in Dockerfile that we are doing
chmod +x /scripts/*.shbut this only affects one of the scripts (which is the token generation one) and any other script in any other folder is still treated as non-executable.(I'm omitting fixing up permissions on file mounts for this one, it will still launch but you'll mostly likely get an error on the actual app - that doesn't matter for this issue though as container will still launch.)
1001:1001Expected behavior
Container starts up.
Actual Behavior
Container exits with
/bin/sh: /app/scripts/docker/entrypoint.sh: Permission deniedVersion and Environment
Podman v5.4.0 (Quadlet), Pocket-ID v0.39.0 , User set to
1001:1001andExec=/bin/sh -c /app/scripts/docker/entrypoint.shLog Output
@MrRubberDucky commented on GitHub:
No, same error.
@MrRubberDucky commented on GitHub:
Yup, it's fixed. Thanks ❤
@stonith404 commented on GitHub:
The issue is probably caused by the
chmodcommand that doesn't add write permissions to the scripts inside the docker folder. This probably works in Docker but not with Podman as Podman doesn't start the container as a root user.Could you test the
ghcr.io/pocket-id/pocket-id:developmentand let me know if this is fixed?@kmendell commented on GitHub:
I cant seem to replicate this, i would guess this is a podman quadlet thing, it doesn't happen with docker. I dont use podman, nor do i know much about quadlets, so im not sure how these work.. or why it would work on docker and not those.
@stonith404 Ideas?
@kmendell commented on GitHub:
Just to confirm here, if you run it as GID and UID 1000 does it work?
@kmendell commented on GitHub:
Adding for reference.
This was fixed in:
ec4b41a1d2.@stonith404 commented on GitHub:
Fixed in the latest version.