ipunkt/rancherize

.rancherize is created as root when running via container

svensp opened this issue · 3 comments

rancherize is run as root when run inside the container. This means the folder .rancherize is generated for root.

The command passes USER_ID and GROUP_ID as environment variable into the container but it does not have an entrypoint script that actually creates a user with those ids and switches to them.

If used with docker --user "$(id -u):$(id -g)" then rancherize runs with the given user but no longer finds ~/.rancherize.

Possible solutions:

  • Add an entrypoint script that drops rights from root to the given USER_ID and GROUP_ID
  • Add an entrypoint script that drops rights to the user that /var/www/app belongs to. See https://github.com/Graham42/mapped-uid-docker
  • Force the HOME variable to /home/rancherize and use --user in the run command

@rokde can u verify this is fixed with current v2.18.1

@rokde this should be fixed now. please check.

rokde commented

Works for me.