
Today we will learn: What is Docker ?
Docker is the world’s leading software container platform
Docker makes the process of application deployment very easy and efficient and resolves a lot of issues related to deploying applications
Docker is a tool designed to make it easier to deploy and run applications by using containers
Docker gives you a standard way of packaging your application with all its dependencies in a container
Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
Understand Docker with analogy of the Shipping industry
How a real world problem was resolved using containers
Today we will learn: Benefits of using Docker
Build app only once
No worries that the application will not perform the same way it did on testing env
Portability
Version Control
Isolation
Productivity
Docker simplifies
DevOps
Today we will learn: How Docker works ?
1. Understand a general workflow of docker
2. Difference between virtualization and containerization
3. Understand docker client server architecture
4. Understand:
Docker file
Docker images
Docker Containers
Docker Hub / Registry
Docker client
Docker server / daemon
Docker engine
Today we will learn : How to install Docker on Linux ?
Agenda:
Prerequisites
Connect to Linux
Install Docker
Start Docker
Stop Docker
Uninstall Docker
Prerequisite
OS should be 64 bit
Linux kernel ver 3.10 or greater
command to check : uname -r
STEP 1 - Connect to Linux system
STEP 2 - Install DOCKER
sudo yum -y update
sudo yum install -y docker
docker
docker --version
STEP 3 - start DOCKER
sudo service docker start
sudo usermod -a -G docker "user"
docker info
docker run hello-world : to run hello-world image
docker images : to get list of images present locally
docker ps : to get list of running containers
docker ps -a . : to get list of all containers
STEP 4 - stop DOCKER
sudo service docker stop
uninstall DOCKER
sudo yum remove docker
HELPFUL TIPS
You can visit - https://get.docker.com/
for more installation related help
To install docker from binaries
https://docs.docker.com/engine/installation/binaries/
Installation steps for amazon ec2
http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
References:
Linux free instance - https://aws.amazon.com/free/
Docker Manuals - https://docs.docker.com/manuals/
https://get.docker.com/
https://docs.docker.com/engine/installation/binaries/
http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
Today we will learn : How to install Docker on Windows Step by Step
We will see:
Prerequisites
Install Docker
Troubleshooting tips
Validate installation
Uninstall Docker
____________________________________________________________
USEFUL INFORMATION
If you install the Docker Toolbox on a Windows machine, the installer automatically installs Oracle Virtualbox to run the Docker virtual machine.
____________________________________________________________
Prerequisites
OS - 64 bit
Windows 7 or higher
____________________________________________________________
STEP 1 : Install Docker
https://docs.docker.com/toolbox/toolbox_install_windows/
https://docs.docker.com/docker-for-windows/install/
____________________________________________________________
STEP 2 : Troubleshooting (if any issue occurs)
Convenient way to enable/disable Hyper-V
https://superuser.com/questions/540055/convenient-way-to-enable-disable-hyper-v-in-windows-8
Installing Docker Toolbox on Windows with Hyper-V Installed
https://jayvilalta.com/blog/2016/04/28/installing-docker-toolbox-on-windows-with-hyper-v-installed/
____________________________________________________________
STEP 3 : validate INSTALLATION
run some docker commands
docker
docker --version
docker run "image name"
____________________________________________________________
STEP 4 : uninstall DOCKER
____________________________________________________________
USEFUL LINKS
https://stackoverflow.com/questions/36885985/cannot-start-docker-after-installation-on-windows
https://docs.docker.com/toolbox/faqs/troubleshoot/
____________________________________________________________
References :
Image of docker architecture
References - https://www.wedidknow.xyz/2017/03/docker-ecosystem-how-to-manage-your.html
____________________________________________________________
Today we will learn : How to install Docker on MacOS
Prerequisites
Docker - Mac OS Yosemite 10.10.3 or above
Docker Toolbox - mac OS 10.8 “Mountain Lion” or newer
STEP 1
Install DOCKER
STEP 2
validate INSTALLATION
run some docker commands
STEP 3
uninstall DOCKER
References:
https://www.docker.com/
https://www.docker.com/docker-mac
https://store.docker.com/editions/community/docker-ce-desktop-mac
https://www.docker.com/products/docker-toolbox
https://docs.docker.com/toolbox/overview/
https://docs.docker.com/toolbox/toolbox_install_mac/
Docker Basic Commands | Step by Step for Beginners
Basic
> docker version
> docker -v
> docker infod
> docker --help
> docker login
————————————
Images
> docker images
> docker pull
> docker rmi
————————————
Containers
> docker ps
> docker run
> docker start
> docker stop
————————————
System
> docker stats
> docker system df
> docker system prune
References -
Today we will learn :
TIPS & TRICKS
What are Images
Docker Images are templates used to create Docker containers
Container is a running instance of image
Where are Images Stored
Registries (e.g. docker hub)
Can be stored locally or remote
: docker images --help
: docker pull image
: docker images
: docker images -q
: docker images -f “dangling=false”
: docker images -f “dangling=false” -q
: docker run image
: docker rmi image
: docker rmi -f image
: docker inspect
: docker history imageName
References:
https://hub.docker.com/_/ubuntu/
https://docs.docker.com/engine/reference/commandline/images/
Docker can build images automatically by reading the instructions from a Dockerfile.
Containers are running instances of Docker Images
A single image can be used to create multiple containers
_____________________________________________________
Docker Containers
B E G I N N E R S
Today we will learn :
TIPS & TRICKS
What are Containers:
Containers are running instances of Docker Images
COMMANDS
: docker ps
: docker run ImageName
: docker start ContainerName/ID
: docker stop ContainerName/ID
: docker pause ContainerName/ID
: docker unpause ContainerName/ID
: docker top ContainerName/ID
: docker stats ContainerName/ID
: docker attach ContainerName/ID
: docker kill ContainerName/ID
: docker rm ContainerName/ID
: docker history ImageName/ID
References:
https://docs.docker.com/engine/reference/commandline/container/#child-commands
_____________________________________________________
Notes
What are Containers:
Containers are running instances of Docker Images
A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings.
Features of Containers:
Are lightweight
Less resources are used
Booting of containers is very fast
Can start, stop, kill, remove containers easily and quickly
Operating System resources can be shared within Docker
Containers run on the same machine sharing the same Operating system Kernel, this makes it faster
You can use command
docker container create
to create container in stopped state
Jenkins on Docker
Step by Step for Beginners
Today we will learn :
> docker pull jenkins
> docker run -p 8080:8080 -p 50000:50000 jenkins
> docker run --name MyJenkins -p 8080:8080 -p 50000:50000 -v /Users/raghav/Desktop/Jenkins_Home:/var/jenkins_home jenkins
> docker run --name MyJenkins2 -p 9090:8080 -p 50000:50000 -v /Users/raghav/Desktop/Jenkins_Home:/var/jenkins_home jenkins
> docker volume create myjenkins
> docker volume ls
> docker volume inspect myjenkins
> docker run --name MyJenkins3 -p 9090:8080 -p 50000:50000 -v myjenkins:/var/jenkins_home jenkins
> docker inspect MyJenkins3
References - https://hub.docker.com/_/jenkins/
This course is created for complete beginners.
Understand DOCKER in the easiest way with analogies.
If you want to understand what really docker is and how it works, this course is for you. Very basic step by step videos to guide you from scratch.
In this session, we will start from very basics of DOCKER
What is DOCKER
Why you should use DOCKER
How DOCKER works
Benefits of DOCKER
How to install DOCKER
Basic Commands
Docker Images
Docker Containers
Dockerfile
Docker Compose
Docker with Jenkins
Docker Swarm and much more...
Let's Get Started...