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

cannot run fedora/apache image in env where root user is prohibited #245

Open
surajssd opened this issue Nov 21, 2016 · 3 comments
Open

Comments

@surajssd
Copy link

$subject, so when i run docker.io/fedora/apache in an environment where root user/actions are prohibited(like openshift) container cannot boot up.

See following container log:

$ docker logs 9c50a64d5b97                                                                                                                                 
rm: cannot remove '/run/httpd/*': Permission denied
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00058: Error retrieving pid file /run/httpd/httpd.pid
AH00059: Remove it before continuing if it is corrupted.  
@trishnaguha
Copy link
Contributor

This looks like an easyfix https://github.com/fedora-cloud/Fedora-Dockerfiles/blob/master/apache/run-apache.sh#L6 .

@surajssd
Copy link
Author

@trishnaguha but that line seems to be there for a reason!

If you need help recreating this issue please tell me.

@mdeguzis
Copy link

mdeguzis commented Feb 3, 2018

I would enter the docker image and check the permissions on /run/httpd. In my case, I was trying to use the user httpd, when the start process is owned by apache. I suppose you could add httpd user to apache group too.

docker run -itu 0 --entrypoint /bin/bash <IMAGE>
ls -la /run
ls -la /run/httpd

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