Uploading web source files to apache docker container

Hi

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.

Hi,

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 https://hub.docker.com/_/httpd/

Regards

1 Like