Container
Container
Container
Why Virtualization and Linux Containers
Introduction to Docker
Installing and Managing Docker
Docker pull, run, attach
Exploring Docker hub
Pulling images from hub
AP2V Solutions Private Limited
What’s Virtualization?
2
Without VMs vs With VMs
3
Benefits of virtualization
4
Virtualization Server Softwares
5
What’s Containerization?
6
Virtal machines vs Containers
7
What’s Docker?
8
What’s DockerHub?
9
Installation Docker Prerequisites
add the GPG key for the official Docker repository to the system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key
add -
update the package database with the Docker packages from the newly added
repo:
sudo apt-get update
10
Verify the Prerequisites
- Make sure you are about to install from the Docker repo instead of the default
Ubuntu 16.04 repo:
apt-cache policy docker-ce
docker-ce:
Installed: (none)
Candidate: 17.03.1~ce-0~ubuntu-xenial
Version table:
17.03.1~ce-0~ubuntu-xenial 500
17.03.0~ce-0~ubuntu-xenial 500
11
Install Docker
sudo apt-get install -y docker-ce
12
Using the Docker Command
docker [option] [command] [arguments]
13
Working with Docker Images .. to be continued
To check whether you can access and download images from Docker Hub, type:
docker run hello-world
14
Working with Docker Images
To see the images that have been downloaded to your computer, type:
docker images
15
Running a Docker Container
Let's run a container using the latest image of Ubuntu. The combination of the
-i and -t switches gives you interactive shell access into the container:
docker run -it ubuntu
Your command prompt should change to reflect the fact that you're now
working inside the container. (Ctrl+p) + (Ctrl+q) to exit from containers
16
Committing Changes in a Container
To save the state of the container as a new image, first exit from it:
exit
17
Listing Docker Containers
18
Pushing Images to Repository
- You need an account on Docker Hub. Please create one by registering yourself
at https://hub.docker.com
19
Lets see practical.
20