Install Docker on CentOS-7

For ones, who want to build and run Docker containers on CentOS-7 – first of all it is required to install Docker itself.

To install the latest version of Docker and to be able to upgrade it easily in future – it is recommended to install Docker from the official repository.

In this guide i will show how to install free Docker CE (Community Edition) on CentOS-7 from the stable official repository, how to verify that it is installed correctly and will show the common post-installation steps to perform. (more…)

Docker: Stop Container

The docker stop command stops running Docker containers.

To stop a container it sends the SIGTERM signal to the main process inside a Docker container requesting it to terminate.

If the main process inside a container is not terminated after a grace period, the docker stop command sends the SIGKILL signal to cause it to terminate immediately.

In this post i am showing an example of how to stop a Docker container and also how to stop all running Docker containers. (more…)

Docker: Run Image as Container

The docker run command serves for creating containers from images.

In this article i will show how to run a Docker image as a container on the example of the official latest base image of Ubuntu.

I will show how to install apache2 inside a container with Ubuntu and how to save this container as a new image.

And finally i will show how to run this new Docker image as a container in the both interactive and background modes. (more…)

Docker: Pull Command – Examples

The docker pull command serves for downloading Docker images from a registry.

By default, the docker pull command pulls images from Docker Hub, but it is also possible to manually specify the private registry to pull from.

Before running the docker pull command it needs to search the Docker registry for the image to download.

In the examples below i will show how to pull the CentOS image from the official repository. (more…)

Docker: Remove Image – Remove All Images – Remove Unused

To delete a particular Docker image firstly you have to find out the IMAGE ID by listing the all local Docker images.

When the image for deletion is identified it can be removed with the docker rmi command.

From the command-line it is also possible to remove unused Docker images (not used by any containers) or, if it is needed, you can force removal of the all locally downloaded Docker images. (more…)