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
+32-9Lines changed: 32 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This lab offers developers an intro-level, hands-on session with Docker, from in
11
11
12
12
toc::[]
13
13
14
-
##Requirements
14
+
##Prerequisites
15
15
This lab can be executed on a netbook with x86 architecture. For it to
16
16
be fun, you should have a decent hardware available. Beside the operating system of choice, there's only one other thing you should have installed already: A JDK.
17
17
@@ -24,7 +24,7 @@ be fun, you should have a decent hardware available. Beside the operating system
24
24
.. 4 to 8 GB for attendees
25
25
.. 8 to 16 GB for instructors
26
26
27
-
#### Software
27
+
### Software
28
28
29
29
. Operating System
30
30
.. Windows 7 (SP1)
@@ -37,18 +37,18 @@ be fun, you should have a decent hardware available. Beside the operating system
37
37
38
38
This section describes the relevant steps for both attendees and instructors to setup the environments. Please follow the parts, that are appropriate for you.
39
39
40
-
###Attendees
40
+
###Instructor
41
41
42
-
This lab is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab. We did our best to support a wide range of client configurations but only did test on machines as stated in the hardware section. Please make sure to double check your configuration.
42
+
The instructor setup is designed to make the lab most reliable even with bad internet connections. Most if not all of the software can be directly downloaded from the instructor machine. The machine is setup as docker host and also runs a docker registry. Please make sure to execute these instructions way prior to the lab to provide a good experience to the attendees.
43
43
44
-
link:https://github.com/arun-gupta/docker-java/tree/master/attendees[Go directly to the attendee Setup]
44
+
link:https://github.com/arun-gupta/docker-java/tree/master/instructor[Go directly to the Instructor Setup]
45
45
46
46
47
-
###Instructor
47
+
###Attendees
48
48
49
-
The instructor setup is designed to make the lab most reliable even with bad internet connections. Most if not all of the software can be directly downloaded from the instructor machine. The machine is setup as docker host and also runs a docker registry. Please make sure to execute these instructions way prior to the lab to provide a good experience to the attendees.
49
+
This lab is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab. We did our best to support a wide range of client configurations but only did test on machines as stated in the hardware section. Please make sure to double check your configuration.
50
50
51
-
link:https://github.com/arun-gupta/docker-java/tree/master/instructor[Go directly to the Instructor Setup]
51
+
link:https://github.com/arun-gupta/docker-java/tree/master/attendees[Go directly to the attendee Setup]
Client communicates with Daemon, either co-located on the same host, or on a different host. It requests the Daemon to pull an image from the repository using `pull` command. The Daemon then downloads the image from Docker Hub, or whatever registry is configured. Multiple images can be downloaded from the registry and installed on Daemon host. Images are run using `run` command to create containers on demand.
107
107
108
+
**How does a Docker Image work?**
109
+
110
+
We've already seen that Docker images are read-only templates from which Docker containers are launched. Each image consists of a series of layers. Docker makes use of union file systems to combine these layers into a single image. Union file systems allow files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system.
111
+
112
+
One of the reasons Docker is so lightweight is because of these layers. When you change a Docker image—for example, update an application to a new version— a new layer gets built. Thus, rather than replacing the whole image or entirely rebuilding, as you may do with a virtual machine, only that layer is added or updated. Now you don't need to distribute a whole new image, just the update, making distributing Docker images faster and simpler.
113
+
114
+
Every image starts from a base image, for example ubuntu, a base Ubuntu image, or fedora, a base Fedora image. You can also use images of your own as the basis for a new image, for example if you have a base Apache image you could use this as the base of all your web application images.
115
+
116
+
_Note: Docker usually gets these base images from Docker Hub._
117
+
118
+
Docker images are then built from these base images using a simple, descriptive set of steps we call instructions. Each instruction creates a new layer in our image. Instructions include actions like:
119
+
120
+
. Run a command.
121
+
. Add a file or directory.
122
+
. Create an environment variable.
123
+
. What process to run when launching a container from this image.
124
+
125
+
These instructions are stored in a file called a Dockerfile. Docker reads this Dockerfile when you request a build of an image, executes the instructions, and returns a final image.
126
+
127
+
**How does a container work?**
128
+
129
+
A container consists of an operating system, user-added files, and meta-data. As we've seen, each container is built from an image. That image tells Docker what the container holds, what process to run when the container is launched, and a variety of other configuration data. The Docker image is read-only. When Docker runs a container from an image, it adds a read-write layer on top of the image (using a union file system as we saw earlier) in which your application can then run.
0 commit comments