Skip to content

Commit 5dae841

Browse files
committed
Minor Fixes
1 parent 8ad2207 commit 5dae841

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

readme.adoc

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,34 @@ After it is started you can find out about the IP address of your host with
266266
----
267267
docker-machine ip
268268
----
269-
We'll use this from now on as <HOST_IP> in the commands.
269+
We already did this during the setup document, remember? So, this is a good chance to check, if you already added this IP to your hosts file.
270+
Type:
270271

271-
Now we need a WildFly and a database. Start with the Postgres database.
272+
[source, text]
273+
----
274+
ping dockerhost
275+
----
276+
277+
and see if this resolves to the IP address that the docker-machine command printed out.
278+
If it does, you're ready to start over with the lab. Let's get started with the real work.
279+
280+
Time to bring in WildFly and a database. You'll start with the database. We choose Postgres as our database for the Ticketmonster application.
272281

273282
[source, text]
274283
----
275284
docker run --name db -d -p 5432:5432 -e POSTGRES_USER=ticketmonster -e POSTGRES_PASSWORD=ticketmonster-docker <INSTRUCTOR_IP>:5000/postgres
276285
----
277286
This command starts a container named "db" from the image in your instructor's registry "<INSTRUCTOR_IP>:5000/postgres". As this will not be present locally, it needs to be downloaded first. But you'll have a very quick connection to the instructor registry and this shouldn't take long.
278287
The two "-e" options define environment variables which are read by the db at startup and allow us to access the database with this user and password.
279-
Finally, the "-d" option tells docker to start a demon process. "-p" maps container ports to host ports and allows other containers on our host to access it.
288+
Finally, the "-d" option tells docker to start a demon process. Which means, that the console window, you're running this command in, will be available again after it is issued. If you skip this parameter, the console will be directly showing the output from the process.
289+
"-p" option maps container ports to host ports and allows other containers on our host to access them.
290+
291+
.More Information about port mapping
292+
[NOTE]
293+
===============================
294+
Port exposure and mapping are the keys to successful work with Docker.
295+
See more about networking on the Docker website link:https://docs.docker.com/articles/networking/[Advanced Networking]
296+
===============================
280297

281298
This should have worked. To double check if it did, you can see the server logs
282299
[source, text]
@@ -309,7 +326,7 @@ Check the logs if the server is started.
309326
docker logs -f wildfly
310327
----
311328

312-
And access the http://<HOST_IP>:8080 with your webbrowser to make sure the instance is up and running.
329+
And access the http://dockerhost:8080 with your webbrowser to make sure the instance is up and running.
313330

314331
Now you're ready to deploy the application for the first time. Let's use JBoss Developer Studio for this.
315332

0 commit comments

Comments
 (0)