Docker Community Forums

Share and learn in the Docker community.

Where to copy html files in apache docker container


(Rafiqul) #1

Hi
I have an apache image. And I am not sure where to copy my html files. in host server my html file is inside
/etc/ussd-files

and normaly in apache2 server we copy files in
/var/www/html

i am writting my command for docker container

docker run -d \
-p 80:80
-v /etc/ussd-files:/var/www/html:rw
ussd-server (this is my image)

What I am missing


(Jeff Anderson) #2

You’ll want to make your files available wherever you have your apache docroot configured.


(Rafiqul) #3

Thanks Jeff
Then my container would be just like this.
docker run -d -p 80:80 ussd-server

How do I configure docroot from this container. Could you please help me on it?


(Rafiqul) #4

It is solved needed to include install php5 within the dockerfile.

FROM ubuntu:14.04
RUN apt-get install -y
apache2
apache2-utils
php5 libapache2-mod-php5
EXPOSE 80
CMD [“apache2ctl”, “-D”, “FOREGROUND”]