You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.me
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@ cd /path/to/repo/docker-nginx-php
9
9
docker built -t webapp . # Build a Docker image named "webapp" from this location "."
10
10
# wait for it to build...
11
11
12
-
#Run the docker container
12
+
#Run the docker container
13
13
docker run -v /path/to/local/web/files:/var/www:rw -p 80:80 -d webapp /sbin/my_init --enable-insecure-key
14
+
```
14
15
15
16
This will bind local port 80 to the container's port 80. This means you should be able to go to "localhost" in your browser (or the IP address of your virtual machine oh which Docker is running) and see your web application files.
16
17
@@ -20,3 +21,4 @@ This will bind local port 80 to the container's port 80. This means you should b
20
21
* `-d webapp` - Use the image tagged "webapp"
21
22
* `/sbin/my_init` - Run the init scripts used to kick off long-running processes and other bootstrapping, as per [phusion/baseimage-docker](https://github.com/phusion/baseimage-docker)
22
23
* `--enable-insecure-key` - Enable a generated SSL key so you can SSH into the container, again as per [phusion/baseimage-docker](https://github.com/phusion/baseimage-docker). Generate your own SSH key for production use.
24
+
* If you use this with [fideloper/docker-mysql](https://github.com/fideloper/docker-mysql), then link this container with MySQL's (after running the MySQL container first) via `-link mysql:db`
0 commit comments