Skip to content

Commit f59f5bc

Browse files
committed
Fix format and generate new html content
1 parent 1a40e78 commit f59f5bc

11 files changed

Lines changed: 1468 additions & 751 deletions

chapters/docker-compose.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ mysqldb_1 | 2015-06-05 15:40:18 1 [Warning] IP address '172.17.0.24' could not
152152
NOTE: Use the port displayed in the `docker-compose ps` command.
153153

154154
.Output From Servers Run Using Docker Compose
155-
image::docker-compose-output.png[]
155+
image::images/docker-compose-output.png[]
156156

157157
### Scale Services
158158

chapters/docker-container-linking.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ This section will show how https://docs.docker.com/userguide/dockerlinks/[Docker
1212
+
1313
[source, text]
1414
----
15-
docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -p 3306:3306 -d mysql #From Internet
15+
#From Internet
16+
docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -p 3306:3306 -d mysql
1617

17-
docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -p 3306:3306 -d classroom.example.com:5000/mysql #From Instructor
18+
#From Instructor
19+
docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -p 3306:3306 -d classroom.example.com:5000/mysql
1820
----
1921
+
2022
`-e` define environment variables that are read by the database at startup and allow us to access the database with this user and password.
@@ -23,9 +25,11 @@ docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_D
2325
+
2426
[source, text]
2527
----
26-
docker run -d --name mywildfly-mysql --link mysqldb:db -p 8080:8080 arungupta/wildfly-mysql-javaee7 #From Internet
28+
#From Internet
29+
docker run -d --name mywildfly-mysql --link mysqldb:db -p 8080:8080 arungupta/wildfly-mysql-javaee7
2730

28-
docker run -d --name mywildfly-mysql --link mysqldb:db -p 8080:8080 classroom.example.com:5000/wildfly-mysql-javaee7 #From Instructor
31+
#From Instructor
32+
docker run -d --name mywildfly-mysql --link mysqldb:db -p 8080:8080 classroom.example.com:5000/wildfly-mysql-javaee7
2933
----
3034
+
3135
`--link` takes two parameters - first is name of the container we're linking to and second is the alias for the link name.

chapters/docker-container.adoc

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ Now, let's get a vanilla `jboss/wildfly` image:
2323

2424
[source, text]
2525
----
26-
docker pull jboss/wildfly:latest #From Internet
27-
docker pull classroom.example.com:5000/wildfly:latest #From Instructor
26+
#From Internet
27+
docker pull jboss/wildfly:latest
28+
29+
#From Instructor
30+
docker pull classroom.example.com:5000/wildfly:latest
2831
----
2932

3033
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.
7578

7679
[source, text]
7780
----
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
8086
----
8187

8288
This will show the output as:
@@ -123,8 +129,11 @@ Restart the container in detached mode:
123129

124130
[source, text]
125131
----
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
128137
129138
972f51cc8422eec0a7ea9a804a55a2827b5537c00a6bfd45f8646cb764bc002a
130139
----
@@ -182,8 +191,11 @@ Restart the container as:
182191

183192
[source, text]
184193
----
185-
docker run --name mywildfly-exposed-ports -d -P jboss/wildfly #From Internet
186-
docker run --name mywildfly-exposed-ports -d -P classroom.example.com:5000/wildfly #From Instructor
194+
#From Internet
195+
docker run --name mywildfly-exposed-ports -d -P jboss/wildfly
196+
197+
#From Instructor
198+
docker run --name mywildfly-exposed-ports -d -P classroom.example.com:5000/wildfly
187199
----
188200

189201
`-P` map any exposed ports inside the image to a random port on the Docker host. This can be verified as:
@@ -212,8 +224,11 @@ Restart the container as:
212224

213225
[source, text]
214226
----
215-
docker run --name mywildfly-mapped-ports -d -p 8080:8080 jboss/wildfly #From Internet
216-
docker run --name mywildfly-mapped-ports -d -p 8080:8080 classroom.example.com:5000/wildfly #From Instructor
227+
#From Internet
228+
docker run --name mywildfly-mapped-ports -d -p 8080:8080 jboss/wildfly
229+
230+
#From Instructor
231+
docker run --name mywildfly-mapped-ports -d -p 8080:8080 classroom.example.com:5000/wildfly
217232
----
218233

219234
The format is `-p hostPort:containerPort`. This option maps container ports to host ports and allows other containers on our host to access them.
@@ -248,17 +263,22 @@ The following command will override the default command in Docker file, start Wi
248263

249264
[source, text]
250265
----
251-
docker run --name managed-wildfly -P -d jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 #From Internet
266+
#From Internet
267+
docker run --name managed-wildfly -P -d jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
252268
253-
docker run --name managed-wildfly -P -d classroom.example.com:5000/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 #From Instructor
269+
#From Instructor
270+
docker run --name managed-wildfly -P -d classroom.example.com:5000/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
254271
----
255272

256273
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:
257274

258275
[source, text]
259276
----
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
262282
----
263283

264284
`-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:
325345

326346
[source, text]
327347
----
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
330353
----
331354

332355
In this case, Docker port mapping will be shown as:

chapters/docker-deployment-options.adoc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ We're going to build the application first.
99

1010
. Clone the repo:
1111

12-
git clone https://github.com/javaee-samples/javaee7-simple-sample.git #From Internet
13-
git clone http://root:dockeradmin@classroom.example.com:10080/root/javaee7-simple-sample.git #From Instructor
12+
#From Internet
13+
git clone https://github.com/javaee-samples/javaee7-simple-sample.git
14+
15+
#From Instructor
16+
git clone http://root:dockeradmin@classroom.example.com:10080/root/javaee7-simple-sample.git
1417

1518

1619
. Build the application:
@@ -42,9 +45,11 @@ Start WildFly server as:
4245

4346
[source, text]
4447
----
45-
docker run --name wildfly -d -p 8080:8080 -v `pwd`/deployments:/opt/jboss/wildfly/standalone/deployments/:rw jboss/wildfly #From Internet
48+
#From Internet
49+
docker run --name wildfly -d -p 8080:8080 -v `pwd`/deployments:/opt/jboss/wildfly/standalone/deployments/:rw jboss/wildfly
4650
47-
docker run --name wildfly -d -p 8080:8080 -v `pwd`/deployments:/opt/jboss/wildfly/standalone/deployments/:rw classroom.example.com:5000/wildfly #From Instructor
51+
#From Instructor
52+
docker run --name wildfly -d -p 8080:8080 -v `pwd`/deployments:/opt/jboss/wildfly/standalone/deployments/:rw classroom.example.com:5000/wildfly
4853
----
4954

5055
[NOTE]
@@ -145,8 +150,11 @@ Start WildFly server as:
145150

146151
[source, text]
147152
----
148-
docker run --name wildfly-managed -d -p 8080:8080 -p 9990:9990 rafabene/wildfly-admin #From Internet
149-
docker run --name wildfly-managed -d -p 8080:8080 -p 9990:9990 classroom.example.com:5000/wildfly-management #From Instructor
153+
#From Internet
154+
docker run --name wildfly-managed -d -p 8080:8080 -p 9990:9990 rafabene/wildfly-admin
155+
156+
#From Instructor
157+
docker run --name wildfly-managed -d -p 8080:8080 -p 9990:9990 classroom.example.com:5000/wildfly-management
150158
----
151159

152160
This command starts a container named "`wildfly-managed`".
@@ -223,8 +231,11 @@ A standalone WildFly process, process can be configured to listen for remote man
223231
+
224232
[source, text]
225233
----
226-
docker run -d --name wildfly -p 8080:8080 -p 9990:9990 rafabene/wildfly-admin #From Internet
227-
docker run -d --name wildfly -p 8080:8080 -p 9990:9990 classroom.example.com:5000/wildfly-management #From Instructor
234+
#From Internet
235+
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
228239
----
229240
+
230241
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.

chapters/docker-javaee7.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ Pull the Docker image that contains WildFly and pre-built Java EE 7 application
1010

1111
[source, text]
1212
----
13-
docker pull arungupta/javaee7-hol #From Internet
14-
docker pull classroom.example.com:5000/javaee7-hol #From Instructor
13+
#From Internet
14+
docker pull arungupta/javaee7-hol
15+
16+
#From Instructor
17+
docker pull classroom.example.com:5000/javaee7-hol
1518
----
1619

1720
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:
2023

2124
[source, text]
2225
----
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
2531
----
2632

2733
See the application in action at http://dockerhost:8080/movieplex7/. The output is shown:

chapters/docker-setup.adoc

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This section describes what, how, and where to install the software needed for t
77
. Operating System: Mac OS X (10.8 or later), Windows 7 (SP1), Fedora (21 or later)
88
. Memory: At least 4 GB+, preferred 8 GB
99

10-
### Environment
10+
### Environment (Just needed if you are running with Instructor support)
1111

1212
#### DNS Server setup Windows
1313

@@ -53,9 +53,9 @@ You can find GIT for Windows at: http://classroom.example.com:8082/downloads/Git
5353

5454
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.
5555

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/ .
5959

6060
[WARNING]
6161
====
@@ -68,9 +68,9 @@ Linux Users
6868

6969
### Vagrant
7070

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/
7474
and install.
7575

7676
### Docker Machine
@@ -111,42 +111,40 @@ docker-machine create --driver=virtualbox lab
111111
eval "$(docker-machine env lab)"
112112
----
113113

114-
115114
. Or Create Docker Host to be used in the lab with an Instructor:
116-
+
117115
[source, text]
118116
----
119117
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=http://classroom.example.com:8082/downloads/boot2docker.iso --engine-insecure-registry=classroom.example.com:5000 lab
120118

121119
eval "$(docker-machine env lab)"
122120
----
123-
+
121+
124122
Use the following command on Windows:
125-
+
123+
126124
[source, text]
127125
----
128126
docker-machine env lab --shell cmd
129127
----
130-
+
128+
131129
And then execute all the `set` commands.
132-
+
130+
133131
. 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+
135133
[source, text]
136134
----
137135
docker-machine ip lab
138136
----
139-
+
137+
140138
This will provide the IP address associated with the Docker Machine created earlier.
141-
+
139+
142140
. Edit `C:\Windows\System32\drivers\etc\hosts` (Windows) or `/etc/hosts` (Mac OS or Linux) and add:
143-
+
141+
144142
[source, text]
145143
----
146144
<IP ADDRESS> dockerhost
147145
----
148146
. Check if the entry is working:
149-
+
147+
150148
[source, text]
151149
----
152150
ping dockerhost
@@ -204,10 +202,10 @@ To install JBoss Developer Studio stand-alone, complete the following steps:
204202
. From Instructor: http://classroom.example.com:8082/downloads/jboss-devstudio-9.0.0.GA-installer-standalone.jar .
205203

206204
. Start the installer as:
207-
+
205+
208206
[source, text]
209207
----
210208
java -jar <JAR FILE NAME>
211209
----
212-
+
210+
213211
Follow the on-screen instructions to complete the installation process.

0 commit comments

Comments
 (0)