Skip to content

Commit c6c5ad8

Browse files
committed
first shot at updating to Docker 1.13
1 parent 09580ed commit c6c5ad8

File tree

5 files changed

+179
-222
lines changed

5 files changed

+179
-222
lines changed

developer-tools/java/chapters/ch01-setup.adoc

+16-43
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ This section describes the hardware and software needed for this workshop, and h
1313

1414
Docker runs natively on Mac, Windows and Linux. Follow the instructions to install Docker:
1515

16-
. https://www.docker.com/products/docker#/mac[Docker for Mac]
17-
. https://www.docker.com/products/docker#/windows[Docker for Windows]
18-
. http://docs.docker.com/engine/installation/ubuntulinux/[Docker on Ubuntu]
19-
. http://docs.docker.com/engine/installation/centos/[Docker on Centos]
16+
. https://docs.docker.com/docker-for-mac/[Mac]
17+
. https://docs.docker.com/docker-for-windows/[Windows]
18+
. https://docs.docker.com/engine/installation/linux/centos/[Centos]
19+
. https://docs.docker.com/engine/installation/linux/debian/[Debian]
20+
. https://docs.docker.com/engine/installation/linux/ubuntulinux/[Ubuntu]
2021

2122
NOTE: Docker for Mac and Windows have requirements for a fairly recent operating system version. If your machine does not meet these requirements, then you need to install https://www.docker.com/products/docker-toolbox[Docker Toolbox].
2223

@@ -26,67 +27,38 @@ Complete set of operating systems are listed at http://docs.docker.com/engine/in
2627

2728
Install the following additional components:
2829

29-
. Docker Compose: https://github.com/docker/compose/releases
30+
. https://docs.docker.com/compose/install/[Docker Compose]
3031

3132
=== Docker Toolbox Notes
3233

3334
Skip this section if you are not using Docker Toolbox for Mac or Windows.
3435

3536
. *Default Docker Machine*: Docker Toolbox creates a Docker Machine named `default`. To make it easier to start/stop the containers, an entry is added into the host mapping table of your operating system.
3637
+
37-
Find out IP address of your machine:
38+
Find out the IP address of your Docker Machine:
3839
+
39-
```console
40+
```
4041
docker-machine ip default
4142
```
4243
+
4344
This will provide the IP address associated with the Docker Machine created by Toolbox.
4445
+
45-
. *Docker CLI Shell*: Any Docker CLI command needs to be issued from the Terminal or Command Prompt where `eval $(docker-machine env default)` command was issued. This will make sure Docker CLI is configured to talk to the VM created by Docker Toolbox.
46-
47-
=== Setup Host Mapping
48-
49-
For Linux, Docker host is running on local machine and so the IP address would be `127.0.0.1`.
50-
51-
Edit `/etc/hosts` (Mac OS or Linux) or `C:\Windows\System32\drivers\etc\hosts` (Windows) and add:
46+
Edit `/etc/hosts` (Mac OS) or `C:\Windows\System32\drivers\etc\hosts` (Windows) and add:
5247

5348
[source, text]
5449
----
5550
<IP ADDRESS> dockerhost
56-
<IP ADDRESS> localhost
5751
----
58-
59-
This allows to access Docker containers using `dockerhost` or `localhost`.
52+
+
53+
This allows to access Docker containers using `dockerhost`.
54+
+
55+
. *Docker CLI Shell*: Any Docker CLI command needs to be issued from the Terminal or Command Prompt where `eval $(docker-machine env default)` command was issued. This will make sure Docker CLI is configured to talk to the VM created by Docker Toolbox.
6056

6157
=== Download Images
6258

6359
This tutorial uses a few Docker images and software. Let's download them before we start the tutorial.
6460

65-
Create a new file, name it `docker-compose-pull-images.yml`, and add the following content:
66-
67-
[source, text]
68-
----
69-
ubuntu:
70-
image: ubuntu
71-
busybox:
72-
image: busybox
73-
openjdk:
74-
image: openjdk
75-
wildfly:
76-
image: jboss/wildfly
77-
mysql:
78-
image: mysql
79-
javaee7-hol:
80-
image: arungupta/javaee7-hol
81-
swarm:
82-
image: swarm
83-
wildfly-couchbase-javaee7:
84-
image: arungupta/wildfly-couchbase-javaee7
85-
couchbase:
86-
image: arungupta/couchbase
87-
----
88-
89-
Give the command to pull all the images:
61+
Download the file from https://github.com/docker/labs/blob/master/developer-tools/java/scripts/docker-compose-pull-images.yml and give the command to pull all the images:
9062

9163
```console
9264
docker-compose -f docker-compose-pull-images.yml pull
@@ -99,6 +71,7 @@ NOTE: For Linux, `docker-compose` and `docker` commands need `sudo` access. So p
9971
. Download Java IDE based upon your choice and install.
10072
.. http://bits.netbeans.org/download/trunk/nightly/latest/[NetBeans Nightly] (`"Java EE"` version)
10173
.. https://www.jetbrains.com/idea/download/[IntelliJ IDEA Community or Ultimate]
102-
.. http://eclipse.org/[Eclipse IDE for Java EE Developers Mars 2]
74+
.. http://www.eclipse.org/downloads/eclipse-packages/[Eclipse IDE for Java EE Developers]
10375
. Download https://maven.apache.org/download.cgi[Maven] and install.
10476
. Install Docker Cloud CLI following the https://docs.docker.com/docker-cloud/tutorials/installing-cli/[instructions].
77+

developer-tools/java/chapters/ch02-basic-concepts.adoc

+14-41
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Docker has three main components:
2424
. __Containers__ are the *run component* of Docker and created from images. Containers can be run, started, stopped, moved, and deleted.
2525
. Images are stored, shared, and managed in a __registry__ and are the *distribution component* of Docker. Docker Hub is a publicly available registry and is available at http://hub.docker.com.
2626

27-
In order for these three components to work together, the *Docker Daemon* runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. In addition, the *Client* is a Docker binary which accepts commands from the user and communicates back and forth with the Daemon.
27+
In order for these three components to work together, the *Docker Daemon* (or Docker Engine) runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. In addition, the *Client* is a Docker binary which accepts commands from the user and communicates back and forth with the Engine.
2828

2929
.Docker architecture
3030
image::docker-architecture.png[]
3131

32-
The Client communicates with a Daemon that is either co-located on the same host or on a different host. Use the `pull` command on the Client to request the Daemon to pull an image from the registry. The Daemon then downloads the image from Docker Hub, or whichever registry is configured. Multiple images can be downloaded from the registry and installed on the Daemon host. To run an Image, use the `run` command on the Client to request the Daemon to create a container on-demand based on the image.
32+
The Client communicates with the Engine that is either co-located on the same host or on a different host. Client uses the `pull` command to request the Engine to pull an image from the registry. The Engine then downloads the image from Docker Hub, or whichever registry is configured. Multiple images can be downloaded from the registry and installed on the Engine. Client uses the `run` run the container.
3333

3434
**How does a Docker Image work?**
3535

@@ -68,57 +68,30 @@ Check if your client is working using the following command:
6868

6969
It shows the output:
7070

71-
Docker version 1.12.0-rc3, build 91e29e8, experimental
71+
Docker version 1.13.0, build 49bf474
7272

7373
NOTE: The exact version may differ based upon how recently the installation was performed.
7474

7575
The exact version of Client and Server can be seen using `docker version` command. This shows the output as:
7676

7777
```
7878
Client:
79-
Version: 1.12.0-rc3
80-
API version: 1.24
81-
Go version: go1.6.2
82-
Git commit: 91e29e8
83-
Built: Sat Jul 2 00:09:24 2016
79+
Version: 1.13.0
80+
API version: 1.25
81+
Go version: go1.7.3
82+
Git commit: 49bf474
83+
Built: Wed Jan 18 16:20:26 2017
8484
OS/Arch: darwin/amd64
85-
Experimental: true
8685

8786
Server:
88-
Version: 1.12.0-rc3
89-
API version: 1.24
90-
Go version: go1.6.2
91-
Git commit: 876f3a7
92-
Built: Tue Jul 5 02:20:13 2016
87+
Version: 1.13.0
88+
API version: 1.25 (minimum version 1.12)
89+
Go version: go1.7.3
90+
Git commit: 49bf474
91+
Built: Wed Jan 18 16:20:26 2017
9392
OS/Arch: linux/amd64
9493
Experimental: true
9594
```
9695

97-
The common commands that'll be used are:
98-
99-
. `run` - runs a container
100-
. `ps`- lists containers
101-
. `stop` - stops a container
102-
. `rm` - Removes a container
103-
104-
Get a full list of available commands with
105-
106-
docker
107-
108-
A more commonly used list of commands is available at <<Common_Docker_Commands>>.
109-
110-
### Verify Docker Configuration
111-
112-
Verify that host mapping is configured correctly by using the command `ping dockerhost`. This resolves to the IP address of where the Docker Host is running. You should see an output as:
113-
114-
[source, text]
115-
----
116-
> ping dockerhost
117-
PING dockerhost (127.0.0.1): 56 data bytes
118-
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.035 ms
119-
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.078 ms
120-
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.059 ms
121-
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.058 ms
122-
----
96+
The complete set of commands can be seen using `docker --help`.
12397

124-
If it does, you're ready to start the workshop.

0 commit comments

Comments
 (0)