Quick Introduction to Docker
on
Stats, What, Why, How, Setup, Components ..
dockercon17
Docker moby ranks 20th in gitstar-ranking
Docker is an open platform for developing, shipping, and running applications.
virtual-machines vs containers
- Containers are lightweight because they don't need the extra load of a hypervisor,
but run directly within the host machine's kernel.
- This means you can run more containers on a given hardware combination
than if you were using virtual machines.
Docker Container
- Linux x86-64
- Go language
- Client - Server (deamon) architecture
- Union file systems (UnionFS: AUFS, btrfs, vfs etc)
- Namespaces (pid, net, ipc, mnt, uts)
- Control Groups (cgroups)
- Container format (libcontainer)
See more at Understanding docker
Docker with Linux
Docker accesses virtualisation features of Linux and thus runs natively without docker-machine
brew cask install docker toolbox
- Docker Machine is a tool that lets you install Docker Engine on virtual hosts,
and manage the hosts with docker-machine commands (client-server).
- You can use Machine to create Docker hosts
on your local Mac or Windows box,
on your company network or data center,
or on cloud providers like Azure, AWS, or Digital Ocean.
- Compose is a tool for defining and running multi-container Docker applications.
- With Compose, you use a Compose file (Dockerfile) to configure your application's services.
- Then, using a single command, you create and start all the services from your configuration.
Graphical Representation
For Mac and Windows
nsaboo-mn:~ nsaboo$ docker-machine create --driver "virtualbox" myBoxName
Creating CA: /Users/nsaboo/.docker/machine/certs/ca.pem
Creating client certificate: /Users/nsaboo/.docker/machine/certs/cert.pem
Running pre-create checks...
(myBoxName) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(myBoxName) Latest release for github.com/boot2docker/boot2docker is v17.09.0-ce
(myBoxName) Downloading /Users/nsaboo/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.09.0-ce/boot2docker.iso...
(myBoxName) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(myBoxName) Copying /Users/nsaboo/.docker/machine/cache/boot2docker.iso to /Users/nsaboo/.docker/machine/machines/myBoxName/boot2docker.iso...
(myBoxName) Creating VirtualBox VM...
(myBoxName) Creating SSH key...
(myBoxName) Starting the VM...
(myBoxName) Check network to re-create if needed...
(myBoxName) Found a new host-only adapter: "vboxnet0"
(myBoxName) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env myBoxName
Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. It runs completely from RAM, is a small ~38MB download and boots in ~5s.
A native clustering tool for Docker. Swarm pools together several Docker
hosts and exposes them as a single virtual Docker host. It scale up to multiple hosts.
A (hosted) service containing repositories of images which responds to the Registry API.
- toolset to pack, ship, store, and deliver content.
Docker registry could be hosted by a third party, as public or private registry, like one of the following registries:
- Docker Hub,
- Google Container Registry,
- AWS Container Registry
https://nsaboo.github.io/intro-docker/
















