This image is with Ubuntu 16.04 LTS with apache2, php7 and composer
We should map the /var/www/html to access the app contents from outside the docker container.
$ docker run -d -h app -v $(pwd):/var/www/html -p 80:80 --name php7 csemahadi/php7-docker-image > /dev/null
-p 80:80is publish the container’s port(80) to the host-dflag means run container in the background-hflag means hostname-vflag is for mounting current working directory--name php7is the container name is php7
To run commands or edit settings inside the container run the following command:
$ docker exec -it php7 bash