Docker 101 – Part 1


Docker 101  – Part 1

I will try to explain basic docker command on Centos 7 in this entry.

First, let’s talk about a little bit docker terms.

Docker is an open-source project that automates the deployment of applications inside software containers. Containers are like lightweight VMs

Docker image: a read-only Layer is called an image and a image never changes

Docker container: an instance of the image. In other words, container is a running

Docker Hub Registry:A public registry maintained by Docker. You can see the list of the repositories and dockerfiles from

Dockerfile: A text file that contains all the commands you would normally execute manually in order to build a Docker image. It is like a Makefile. Example dockerfiles for mongodb can be seen at

Install docker

Docker is included by default in the CentOS-Extras repository(64 bit only). To install run the following command.

# yum install docker

Run the docker daemon and enable at startup

# service docker start
Redirecting to /bin/systemctl start  docker.service

# chkconfig docker on
Note: Forwarding request to ‘systemctl enable docker.service’.
ln -s ‘/usr/lib/systemd/system/docker.service’ ‘/etc/systemd/system/’

You can use pull parameter to download an image or a repository from a Docker registry server.

As an example, the following command will pull the mongodb listed at

# docker pull dockerfile/mongodb
Pulling repository dockerfile/mongodb
0980bbd7909c: Pulling dependent layers
0980bbd7909c: Pulling image (latest) from dockerfile/mongodb

PS: This article was not finished yet.

Docker 101 – Part 1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s