Skip to content

Commit 50d6e2d

Browse files
committed
Added Docker Basics
1 parent 2f2a0bd commit 50d6e2d

3 files changed

Lines changed: 57 additions & 26 deletions

File tree

attendees/readme.adoc

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Docker for Java Developers
22

3-
This folder contains instructions to setup an attendee environment.
3+
This folder contains instructions to setup an attendee environment. Please note, that it is only intended to setup the environment for this lab. The lab itself is in the link:https://github.com/arun-gupta/docker-java/blob/master/readme.adoc[main readme]. Continue with it after you finished this setup.
4+
5+
Your instructor will have a a machine setup with all the relevant downloads and needed infrastructures. The IP will change depending on the network used. In this guide, it's refered to as <INSTRUCTOR_IP> make sure to replace this with the actuall IP address you get from your instructor.
46

57
## A word about licenses
68
This tutorial only uses software which is open source or at least free to use in development and/or education.
@@ -49,8 +51,8 @@ Download your binary from http://<INSTRUCTOR_IP:8082>/downloads/
4951
# Linux / MacOS
5052
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker
5153
52-
#Windows
53-
curl http://<INSTRUCTOR_IP:8082>/docker-1.6.0.exe
54+
#Windows
55+
curl http://<INSTRUCTOR_IP:8082>/docker-1.6.0.exe
5456
On Windows put into and rename to: c:\docker\docker.exe
5557
----
5658

@@ -62,14 +64,18 @@ On Windows put into and rename to: c:\docker\docker.exe
6264
----
6365
docker-machine create --driver virtualbox --virtualbox-boot2docker-url http://<INSTRUCTOR_IP>:8082/downloads/boot2docker.iso lab
6466
#TODO This boot2docker instruction is being overwritten. Docker-machine will profine flags for this configuration: https://github.com/docker/machine/pull/1040
65-
TODO To avoid it to be overwritten the parameter should be included manually. This issue should be fixed on next docker-machine release.
67+
TODO To avoid it to be overwritten the parameter should be included manually. This issue should be fixed on next docker-machine release.
6668
docker-machine ssh lab "echo $'EXTRA_ARGS=\"--insecure-registry <INSTRUCTOR_IP>:5000\"' | sudo tee -a /var/lib/boot2docker/profile && sudo /etc/init.d/docker restart"
67-
eval "$(docker-machine env lab)"
69+
eval "$(docker-machine env lab)"
6870
----
6971

7072

71-
## Setup JBoss Developer Studio
72-
73-
http://www.jboss.org/download-manager/file/jboss-devstudio-8.1.0.GA-jar_universal.jar[JBoss Developer Studio]
73+
## Setup JBoss Developer Studio
74+
Download your platform binary from http://<INSTRUCTOR_IP:8082>/downloads/
7475

76+
[source, text]
77+
----
78+
# Linux / MacOS
7579
80+
http://www.jboss.org/download-manager/file/jboss-devstudio-8.1.0.GA-jar_universal.jar[JBoss Developer Studio]
81+
----

images/docker-architecture.png

145 KB
Loading

readme.adoc

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ Docker is the developer-friendly Linux container technology that enables creatio
77

88
This lab offers developers an intro-level, hands-on session with Docker, from installation, to exploring Docker Hub, to crafting their own images, to adding Java apps and running custom containers. It will also explain how to use Swarm to orchesorchestrate these containers together. This is a BYOL (bring your own laptop) session, so bring your Windows, OSX, or Linux laptop and be ready to dig into a tool that promises to be at the forefront of our industry for some time to come.
99

10+
## Requirements
11+
This lab can be executed on a netbook with x86 architecture. For it to
12+
be fun, you should have a decent hardware available.
13+
14+
### Hardware
15+
. CPU
16+
.. x86 (Intel Pentium)
17+
.. x64 (i7 and comparable)
18+
.. PowerPC G4
19+
. Memory
20+
.. 4 to 8 GB for attendees
21+
.. 8 to 16 GB for instructors
22+
23+
#### Software
24+
25+
. Operating System
26+
.. Windows 7 (SP1)
27+
.. Mac OS X (10.6.8)
28+
.. Fedora 21
29+
. Java
30+
.. Oracle JDK 8u45 or a comparable OpenJDK
31+
1032
## Setup Environments
1133

1234
This section describes the relevant steps for both attendees and instructors to setup the environments. Please follow the parts, that are appropriate for you.
@@ -17,21 +39,6 @@ This lab is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab. We
1739

1840
link:https://github.com/arun-gupta/docker-java/tree/master/attendees[Go directly to the attendee Setup]
1941

20-
#### Hardware
21-
22-
. CPU
23-
.. x86
24-
.. x64
25-
. Memory
26-
.. min 8 GB for attendees
27-
.. min 16 GB for instructors
28-
29-
#### Software
30-
31-
. Operating System
32-
.. Windows 7 (SP1)
33-
.. Mac OS X
34-
.. Linux / Fedora 21
3542

3643
### Instructor
3744

@@ -42,11 +49,30 @@ link:https://github.com/arun-gupta/docker-java/tree/master/instructor[Go directl
4249
## The Lab
4350

4451
### Docker Basics
52+
Docker simplifies software delivery by making it easy to build and share images that contain your application’s entire environment, or application operating system.
53+
54+
**What does it mean by application operating system ?**
55+
56+
Your application typically require a specific version of operating system, application server, JDK, database server, may require to tune the configuration files, and similarly multiple other dependencies. The application may need binding to specific ports and certain amount of memory. The components and configuration together required to run your application is what is referred to as application operating system.
4557

58+
You can certainly provide an installation script that will download and install these components. Docker simplifies this process by allowing to create an image that contains your application and infrastructure together, managed as one component. These images are then used to create Docker containers which run on the container virtualization platform, provided by Docker.
4659

47-
TODO: Extract some basic information from https://docs.docker.com/introduction/understanding-docker/
60+
**How is it different from VM?**
4861

49-
image::https://docs.docker.com/article-img/architecture.svg[Docker, 200,300]
62+
Docker is an open source container virtualization platform.
63+
64+
Docker has three main components:
65+
66+
. __Images__ are *build component* of Docker and a read-only template of application operating system.
67+
. __Containers__ are *run component* of Docker, and created from, images.Containers can be run, started, stopped, moved, and deleted.
68+
. Images are stored, shared, and managed in a __registry__, the *distribution component* of Docker. The publically available registry is known as Docker Hub.
69+
70+
In order for these three components to work together, there is *Docker Daemon* that runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. In addition, there is *Client* that is a Docker binary which accepts commands from the user and communicates back and forth with the daemon.
71+
72+
.Docker architecture
73+
image::images/docker-architecture.png[]
74+
75+
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.
5076

5177

5278

@@ -93,4 +119,3 @@ http://blog.arungupta.me/docker-compose-orchestrate-containers-techtip77/
93119
## References
94120

95121
. JBoss and Docker: http://www.jboss.org/docker/
96-

0 commit comments

Comments
 (0)