Created time: 2014-10-24 Last updated time:

How to start learning docker

I've started to learn the docker and thinking about the milestone of learning. The docker will be the de fact  standard of the cloud container. By preparing the image of the docker, we can use many type of KVS based cloud platforms and Paas services using it.

Now I'm making docker image for Alinous-Core and the Alinous Document CMS.

The first thing to know is the architecture

The Docker is a container based cloud platform, and it uses the cgroup of the Linux OS. The cgroup is the function to handle namespace of operating system.

By using the cgroup, the container has independent space of the file system, networking and device so that it works like virtual machine on the host. And docker manage the image of the file system just like the git repository.

The first keyword to know is below.

  • Docker image
  • Docker container

The Docker image is the template of the file system, and the container is context running on the Linux OS using cgroup.

In order to run the docker, we have to type following command on the shell.

The "--name" parameter specify the name of container to run and the "centos" is the docker image which is the base template of the container. We can get the standard base image from official repository by following command easily.

The "-itd" options means below.

  • "-i" keep the standard input to be interactive
  • "-t" share the standard out put of the "/bin/bash"
  • "-d" run the container in the background
By this command, the container runs in the back ground.

Watch the running container

After started running container, we can check the running container.

In order to login the container, type below.

The ended docker container's image remains, and you can restart the bash process with the image by "docker start" command.

In order to delete the container image, use "docker rm" command.

This is the overview of the docker. I'm going to make the docker image from Dockerfile next time.

Go to Top