Docker Community Forums

Share and learn in the Docker community.

Uploading web source files to apache docker container

(Rafiqul) #1


I have created a container that is running apache server. I can not access the bin/bash. I can not change directory to navigate htdocs folder to upload my files to be accessible by web browser.

please help.

(Ranjandas) #2


You should either use the COPY instruction in your Dockerfile to copy the files into the htdocs location in your container while building your Apache image Or another best way to do is to use Docker Volume to map the content of htdocs from your host machine to the htdocs directory of the container.

You can refer the docs of httpd official Dockerfile here