dockerphpstorm

Accessing files inside Docker container


I started playing today with Docker, pulled the Centos image, configured apache inside the container with php and I am able to access the website using the ip address. However, I don't know how am I supposed to access the source files of my app that is stored inside the container, using the IDE(PHPStorm). What would be the best way to do that ?


Solution

  • The best way would be to use VOLUME and mount your source codes to the container.
    That way, your IDE will have access to code in the host and all the changes you make will also be reflected in the containers.