Created
March 27, 2020 07:46
-
-
Save Dodsaren/36042c8cee6d4616f60ef9481ff624c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d -p 8082:80 --mount type=bind,source="$(pwd)/htdocs",target=/var/www/html php:apache | |
| 1. If the Docker image php:apache is not present in your machine's local Docker registry, it will be downloaded from Docker hub. | |
| 2. It creates a new container based on the image php:apache. | |
| 3. It maps port 80 from the container to port 8082 on your host machine. | |
| 4. It mounts the directory htdocs/ from your host machine to /var/www/html in the container. | |
| https://nelkinda.com/blog/apache-php-in-docker/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment