Skip to content

Commit 9a343d9

Browse files
committed
Merge pull request eugeneware#24 from vegasbrianc/patch-1
Update README.md
2 parents 968c542 + 504ed97 commit 9a343d9

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,27 @@ $ sudo docker build -t="docker-wordpress-nginx" .
1616

1717
## Usage
1818

19-
To spawn a new instance of wordpress:
19+
To spawn a new instance of wordpress on port 80. The -p 80:80 maps the internal docker port 80 to the outside port 80 of the host machien.
2020

2121
```bash
22-
$ sudo docker run -p 80 -d docker-wordpress-nginx
22+
$ sudo docker run -p 80:80 --name docker-wordpress-nginx -d docker-wordpress-nginx
2323
```
2424

25-
You'll see an ID output like:
25+
Start your newly created docker
26+
2627
```
27-
d404cc2fa27b
28+
$ sudo docker start docker-wordpress-nginx
2829
```
2930

30-
Use this ID to check the port it's on:
31-
```bash
32-
$ sudo docker port d404cc2fa27b 80 # Make sure to change the ID to yours!
31+
After starting the docker-wordpress-nginx check to see if it started and the port mapping is correct. This will also report the port mapping between the docker container and the host machine.
3332
```
33+
$ sudo docker ps
3434
35-
This command returns the container ID, which you can use to find the external port you can use to access Wordpress from your host machine:
36-
37-
```
38-
$ docker port <container-id> 80
35+
0.0.0.0:80 -> 80/tcp docker-wordpress-nginx
3936
```
4037

4138
You can the visit the following URL in a browser on your host machine to get started:
4239

4340
```
44-
http://127.0.0.1:<port>
41+
http://127.0.0.1:80
4542
```

0 commit comments

Comments
 (0)