Hi, I am trying to execute an Apache httpd inside a Docker container. Apache has been installed from source on a Network share. This one is being accessed through nfs. No matter what I execute I always get the same error:
[8] System error: exec: “PREFIX/httpd -f PREFIX/httpd.conf -D FOREGROUND”: stat PREFIX/httpd -f PREFIX/httpd.conf -D FOREGROUND: no such file or directory.
The Commad I execute to run my container is:
docker run -d -p 80:8000 -p 443:8001 -v [ConfigDir]:[ConfigDir] -v [Prefix]/httpd-2.4.18/:[Prefix]/httpd-2.4.18/ -u=80792 Baseimage PREFIX/httpd -f PREFIX/httpd.conf -D FOREGROUND
Here is my Dockerfile:
FROM centos:7
MAINTAINER gabriel.winkler.gw1@roche.com
RUN yum -y update
RUN yum deplist httpd | grep provider | awk ‘{print $2}’ | sort |
uniq | sed ‘:a;N;$!ba;s/\n/ /g’ | xargs yum -y install
EXPOSE 8000
EXPOSE 8001
#Works not with this line enabled or disabled
#CMD ["/apps64/httpd-2.4.18/bin/httpd -f /data64/httpd/docker/rbalv458926/conf/httpd.conf"]
Even if replace the Command for running Apache with “ls /” I get the same error.
I’d be very greatful if any of you geeks could solve this issue.
Cheers
P