Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

.rancherize is created as root when running via container #67

Closed
svensp opened this issue Sep 29, 2017 · 3 comments
Closed

.rancherize is created as root when running via container #67

svensp opened this issue Sep 29, 2017 · 3 comments
Assignees

Comments

@svensp
Copy link
Collaborator

svensp commented Sep 29, 2017

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
justb81 pushed a commit that referenced this issue Sep 29, 2017
* optimize entrypoint for gitlab-ci refs #34
@justb81
Copy link
Member

justb81 commented Oct 2, 2017

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

justb81 pushed a commit that referenced this issue Oct 11, 2017
* revert changes corresponding the entrypoint-file
* change ownership of created files with php
justb81 pushed a commit that referenced this issue Oct 11, 2017
* chown / chgrp need integer
justb81 pushed a commit that referenced this issue Oct 11, 2017
* chown / chgrp for .rancherize directory
@justb81
Copy link
Member

justb81 commented Oct 11, 2017

@rokde this should be fixed now. please check.

@rokde
Copy link
Member

rokde commented Oct 12, 2017

Works for me.

@rokde rokde closed this as completed Oct 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants