Docker Community Forums

Share and learn in the Docker community.

How to write volume from containar by apache

(Hukanzen) #1

i create web application on container on centos 7.
bad apache can’t write to area by volume in docker-compose.

if this system is real machine , i have to do chown -R apache:apache <directory>,bad i did in container so “no such file”.


(Hukanzen) #2

I solved it.

there are record by way to solve in Dockerfile.

1st. i make ‘’


chown apache:apache -R /var/www/html

2nd. i add COPY .

3rd. i add RUN sh prev CMD /usr/bin/httpd -D FOREGROUND

success !