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.adoc
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,17 +266,34 @@ After it is started you can find out about the IP address of your host with
266
266
----
267
267
docker-machine ip
268
268
----
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:
270
271
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.
272
281
273
282
[source, text]
274
283
----
275
284
docker run --name db -d -p 5432:5432 -e POSTGRES_USER=ticketmonster -e POSTGRES_PASSWORD=ticketmonster-docker <INSTRUCTOR_IP>:5000/postgres
276
285
----
277
286
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.
278
287
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
+
===============================
280
297
281
298
This should have worked. To double check if it did, you can see the server logs
282
299
[source, text]
@@ -309,7 +326,7 @@ Check the logs if the server is started.
309
326
docker logs -f wildfly
310
327
----
311
328
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.
313
330
314
331
Now you're ready to deploy the application for the first time. Let's use JBoss Developer Studio for this.
0 commit comments