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
By default, docker images are retrieved from https://hub.docker.com/[Docker Hub]. In our case, we're providing a so called private registry via the instructor laptop.
@@ -75,8 +78,11 @@ To run the WildFly container in an interactive mode.
75
78
76
79
[source, text]
77
80
----
78
-
docker run -it jboss/wildfly #From Internet
79
-
docker run -it classroom.example.com:5000/wildfly #From Instructor
81
+
#From Internet
82
+
docker run -it jboss/wildfly
83
+
84
+
#From Instructor
85
+
docker run -it classroom.example.com:5000/wildfly
80
86
----
81
87
82
88
This will show the output as:
@@ -123,8 +129,11 @@ Restart the container in detached mode:
123
129
124
130
[source, text]
125
131
----
126
-
docker run --name mywildfly -d jboss/wildfly #From Internet
127
-
docker run --name mywildfly -d classroom.example.com:5000/wildfly #From Instructor
132
+
#From Internet
133
+
docker run --name mywildfly -d jboss/wildfly
134
+
135
+
#From Instructor
136
+
docker run --name mywildfly -d classroom.example.com:5000/wildfly
Accessing WildFly Administration Console require a user in administration realm. A pre-created image, with appropriate username/password credentials, is used to start WildFly as:
257
274
258
275
[source, text]
259
276
----
260
-
docker run --name managed-wildfly-from-image -P -d rafabene/wildfly-admin #From Internet
261
-
docker run --name managed-wildfly-from-image -P -d classroom.example.com:5000/wildfly-management #From Instructor
277
+
#From Internet
278
+
docker run --name managed-wildfly-from-image -P -d rafabene/wildfly-admin
279
+
280
+
#From Instructor
281
+
docker run --name managed-wildfly-from-image -P -d classroom.example.com:5000/wildfly-management
262
282
----
263
283
264
284
`-P` map any exposed ports inside the image to a random port on Docker host.
@@ -325,8 +345,11 @@ This management image can also be started with a pre-defined port mapping as:
325
345
326
346
[source, text]
327
347
----
328
-
docker run -p 8080:8080 -p 9990:9990 -d rafabene/wildfly-admin #From Internet
329
-
docker run -p 8080:8080 -p 9990:9990 -d classroom.example.com:5000/wildfly-management #From Instructor
348
+
#From Internet
349
+
docker run -p 8080:8080 -p 9990:9990 -d rafabene/wildfly-admin
350
+
351
+
#From Instructor
352
+
docker run -p 8080:8080 -p 9990:9990 -d classroom.example.com:5000/wildfly-management
330
353
----
331
354
332
355
In this case, Docker port mapping will be shown as:
docker run -d --name wildfly -p 8080:8080 -p 9990:9990 rafabene/wildfly-admin
236
+
237
+
#From Instructor
238
+
docker run -d --name wildfly -p 8080:8080 -p 9990:9990 classroom.example.com:5000/wildfly-management
228
239
----
229
240
+
230
241
In addition to application port 8080, the administration port 9990 is exposed as well. The WildFly image that is used has tweaked the start script such that the management interface is bound to 0.0.0.0.
The https://github.com/arun-gupta/docker-images/blob/master/javaee7-hol/Dockerfile[javaee7-hol Dockerfile] is based on `jboss/wildfly` and adds the movieplex7 application as war file.
@@ -20,8 +23,11 @@ Run it:
20
23
21
24
[source, text]
22
25
----
23
-
docker run -it -p 8080:8080 arungupta/javaee7-hol #From Internet
24
-
docker run -it -p 8080:8080 classroom.example.com:5000/javaee7-hol #From Instructor
26
+
#From Internet
27
+
docker run -it -p 8080:8080 arungupta/javaee7-hol
28
+
29
+
#From Instructor
30
+
docker run -it -p 8080:8080 classroom.example.com:5000/javaee7-hol
25
31
----
26
32
27
33
See the application in action at http://dockerhost:8080/movieplex7/. The output is shown:
Copy file name to clipboardExpand all lines: chapters/docker-setup.adoc
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This section describes what, how, and where to install the software needed for t
7
7
. Operating System: Mac OS X (10.8 or later), Windows 7 (SP1), Fedora (21 or later)
8
8
. Memory: At least 4 GB+, preferred 8 GB
9
9
10
-
### Environment
10
+
### Environment (Just needed if you are running with Instructor support)
11
11
12
12
#### DNS Server setup Windows
13
13
@@ -53,9 +53,9 @@ You can find GIT for Windows at: http://classroom.example.com:8082/downloads/Git
53
53
54
54
Docker currently runs natively on Linux. It can be configured to run in a virtual machine on Mac or Windows. This is why Virtualbox is a requirement for Mac or Windows.
55
55
56
-
Downloads are available
57
-
. from Internet: https://www.virtualbox.org/wiki/Downloads .
58
-
. from Instructor: http://classroom.example.com:8082/downloads/virtualbox/ .
56
+
. Downloads are available
57
+
.. from Internet: https://www.virtualbox.org/wiki/Downloads .
58
+
.. from Instructor: http://classroom.example.com:8082/downloads/virtualbox/ .
59
59
60
60
[WARNING]
61
61
====
@@ -68,9 +68,9 @@ Linux Users
68
68
69
69
### Vagrant
70
70
71
-
Download Vagrant
72
-
. from Internet: https://www.vagrantup.com/downloads.html
73
-
. from Instructor: http://classroom.example.com:8082/downloads/vagrant/
71
+
. Download Vagrant
72
+
.. from Internet: https://www.vagrantup.com/downloads.html
73
+
.. from Instructor: http://classroom.example.com:8082/downloads/vagrant/
. To make it easier to start/stop the containers, an entry is added into the host mapping table of your operating system. Find out the IP address of your machine:
134
-
+
132
+
135
133
[source, text]
136
134
----
137
135
docker-machine ip lab
138
136
----
139
-
+
137
+
140
138
This will provide the IP address associated with the Docker Machine created earlier.
141
-
+
139
+
142
140
. Edit `C:\Windows\System32\drivers\etc\hosts` (Windows) or `/etc/hosts` (Mac OS or Linux) and add:
143
-
+
141
+
144
142
[source, text]
145
143
----
146
144
<IP ADDRESS> dockerhost
147
145
----
148
146
. Check if the entry is working:
149
-
+
147
+
150
148
[source, text]
151
149
----
152
150
ping dockerhost
@@ -204,10 +202,10 @@ To install JBoss Developer Studio stand-alone, complete the following steps:
204
202
. From Instructor: http://classroom.example.com:8082/downloads/jboss-devstudio-9.0.0.GA-installer-standalone.jar .
205
203
206
204
. Start the installer as:
207
-
+
205
+
208
206
[source, text]
209
207
----
210
208
java -jar <JAR FILE NAME>
211
209
----
212
-
+
210
+
213
211
Follow the on-screen instructions to complete the installation process.
0 commit comments