palworld-server-docker icon indicating copy to clipboard operation
palworld-server-docker copied to clipboard

Removed root processes

Open Dashboy1998 opened this issue 1 year ago • 0 comments
trafficstars

Context

  • Continuation of #167
  • Allows container to be ran with --user but still runs with PUID & GUID.

Choices

  • Keeping the ability to still run as root as to not break anything.

Test instructions

[!IMPORTANT] You must set user to NUMBERICAL_UID:NUMBERICAL_GID To find your UID run id -u & to find your GID run id -g. In the examples they are listed as 1000:1000. If you wish to run it as a different UID/GID this can by done by changing the ownership: chown UID:GID palworld/ or by changing the permissions for all other: chmod o=rwx palworld/

  1. Try to start the container as root:root, It should work
  2. Try to start the container as root:steam, Given error
  3. Try to start the container as steam:root, Given error
  4. Start container with 1000:1000
  5. Verify rcon-cli is working: docker exec palworld-server rcon-cli showplayers
  6. Verify backup works: docker exec palworld-server backup
  7. Verify no processes are running as root: docker exec -t palworld-server top -n 1
  8. Verify supercronic is running: docker exec -t palworld-server bash -c "top -n 1 | grep --color supercronic"

Checklist before requesting a review

  • [] I have performed a self-review of my code
  • [x] I've added documentation about this change to the README.
  • [x] I've not introduced breaking changes.

Dashboy1998 avatar Jan 30 '24 02:01 Dashboy1998