Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure JENKINS_HOME is owned by jenkins user #14

Closed
wants to merge 1 commit into from

Conversation

carlossg
Copy link
Contributor

If a volume is mounted, set the correct user permissions before launching Jenkins

As seen in Issue #11

If a volume is mounted, set the correct user permissions before launching Jenkins
carlossg pushed a commit to carlossg/jenkins-swarm-docker that referenced this pull request Sep 30, 2014
@michaelneale
Copy link
Member

@tianon any feedback on validity of doing a CHOWN to bind mounted volumes like this in an official image?

@tianon
Copy link
Contributor

tianon commented Oct 1, 2014

There's definitely already precedent for it in some of the database images; however, su has very nasty behavior when it comes to proper signal handling and even some odd TTY-related issues, so I would really highly discourage its use for this purpose.

In the other images, we've used a tiny utility I developed specificaly for this called gosu (https://github.com/tianon/gosu). See https://github.com/docker-library/postgres/blob/master/Dockerfile.template#L9-L10 and https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh#L15 for examples from the Postgres image.

@carlossg
Copy link
Contributor Author

carlossg commented Oct 1, 2014

You are right, better be conservative in the base image. Maybe just add a check that the dir can be written instead of the stack trace that jenkins throws would be helpful

@ndeloof ndeloof closed this Oct 1, 2014
@carlossg carlossg deleted the ownership branch July 11, 2016 14:02
mreif09 pushed a commit to mreif09/jenkinsci-docker that referenced this pull request Dec 20, 2019
Dockerfile: reduce number of sed calls, layer count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants