panel icon indicating copy to clipboard operation
panel copied to clipboard

Example docker image that can update UID/GID

Open kungfoome opened this issue 8 months ago • 4 comments

I had recently opened an issue to update the UID/GID of the container https://github.com/pelican-dev/panel/issues/1077. This is so that it's easier to mount persistent files and have the proper permissions both within the container and on the host.

While this is not final by any means, it's just an example to show how this could possibly be done. The container does need to be run as root to update permissions, but if that was taken out, you could run the image as a normal user without root.

I also used franken since it included caddy already, just to speed things up a bit.

Nothing runs as root except to change permissions, after which is runs as a normal user. This includes any composer commands as well. The key is also generated using the artisan command and a default admin is created just to get the panel up and running out of the box.

Hopefully we can incorporate some changes to help support changing the uid and gid if you wanted to.

kungfoome avatar Apr 27 '25 00:04 kungfoome

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Apr 27 '25 00:04 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

kungfoome avatar Apr 27 '25 00:04 kungfoome

The container runs as www-data which is a standard user for web hosting.

parkervcp avatar Apr 27 '25 01:04 parkervcp

The container runs as www-data which is a standard user for web hosting.

The user name doesn't matter so much as the ids. The user can be anything really. The main thing is being able to update the ids to match.

kungfoome avatar Apr 27 '25 01:04 kungfoome

Thanks for the contribution. At this moment, we're not interested in officially supporting FrankenPHP, let alone another Docker configuration.

But definitely feel free to PR any changes necessary to the existing config that will let people adjust the UID/GID

lancepioch avatar Jun 07 '25 04:06 lancepioch