Imran Khan Docker Training

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now
  1. What is Docker?.

Docker is container management service. Docker is a easy for developer to develop application, ship them into conatiner which can deployed anywhere.

2. What is Container?.

Container are instance of docker images. Container can run using docker run command. The below command is used to run the conatiner. The basic purpose of docker to run container.

The below command is to run the centos instace on ubuntu system.

docker run -it centos /bin/bash

3. Top 10 commands with 1 example of using docker container.

a. To create an docker container use below command (docker create).

docker create –name=imran httpd

b. To list all container.

docker ps -a

c. To start and stop docker conatiner (docker start and stop)

docker start imran

docker stop imran

d. To restart docker conatiner(docker stop)

docker restart imran

e. To pause docker and Unpause docker.

docker pause imran

docker unpuase docker

f. To kill and remove conatiner(docker kill and rm).

docker kill imran

docker rm imran

g. docker exec command is used to run already running container.

docker exec containerId ls

h. Docker top command is to see the top proccesser within container

docker top containerId

i. docker stats is used to provide the statistics of a running container

docker stats containerId

j. docker attach is used to attach to running container.

docker attach containerId

3.  5 commands with 1 example of using docker image?.

  1. To see the list of docker image on the system

docker images

2. docker run command is used to run the docker container.

docker run images

3. To remove docker images

docker rmi imageId

4. To pull docker image.

docker pull imagenName

5. docker inspect is used to see details of image or container.

docker inspect imageName

5. 5 commands with 1 example of using docker registry?.

a. Login to docker

docker login

b. pull some images using below command.

docker pull redis

c. Tag the image so that it points to your registry

docker image tag redis imrant/imrankhan007

d. Push it.

docker push imrant/imrankhan007

e. List the container or images.

docker images

f. Logout from docker.

docker logout

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x