How do you run an Openshift Docker container as something besides root?
<p>I'm currently running Openshift, but I am running into a problem when I try to build/deploy my custom Docker container.  The container works properly on my local machine, but once it gets built in openshift and I try to deploy it, I get the error message.  I believe the problem is because I am trying to run commands inside of the container as root.</p>

<pre><code>(13)Permission denied: AH00058: Error retrieving pid file /run/httpd/httpd.pid
</code></pre>

<p>My Docker file that I am deploying looks like this - </p>

<pre><code>FROM centos:7
MAINTAINER me&lt;me@me&gt;
RUN yum update -y
RUN yum install -y git https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

RUN yum install -y ansible &amp;&amp; yum clean all -y
RUN git clone https://github.com/dockerFileBootstrap.git
RUN ansible-playbook "-e edit_url=andrewgarfield edit_alias=emmastone site_url=testing.com" dockerAnsible/dockerFileBootstrap.yml
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
COPY supervisord.conf /usr/etc/supervisord.conf
RUN rm -rf supervisord.conf
VOLUME [ "/sys/fs/cgroup" ]
EXPOSE 80 443
#CMD ["/usr/bin/supervisord"]
CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]
</code></pre>

<p>Ive run into a similar problem multiple times where it will say things like <code>Permission Denied on file /supervisord.log</code> or something similar.</p>

<p>How can I set it up so that my container doesnt run all of the commands as root?  It seems to be causing all of the problems that I am having.</p>