官术网_书友最值得收藏!

  • Spring 5.0 By Example
  • Claudio Eduardo de Oliveira
  • 406字
  • 2021-06-24 19:17:29

Installing Docker

Docker is an open source project that helps people to run and manage containers. For developers, Docker helps in different stages of the development lifecycle.

During the development phase, Docker enables developers to spin up different infrastructure services such as databases and service discoveries like Consul without installation in the current system operational. It helps the developers because developers do not need to install these kinds of systems in the operating system layer. Usually, this task can cause conflicts with the libraries during the installation process and consumes a lot of time.

Sometimes, developers need to install the exact version. In this case, it is necessary to reinstall the whole application on the expected version. It is not a good thing because the developer machine during this time becomes slow. The reason is quite simple, there are many applications that are used during software development.

Docker helps developers at this stage. It is quite simple to run a container with MongoDB. There is no installation and it enables developers to start the database with one line. Docker supports the image tag. This feature helps to work with different versions of the software; this is awesome for developers who need to change the software version every time.

Another advantage is that when the developers need to deliver the artifacts for test or production purposes, Docker enables these tasks via Docker images.

Docker helps people to adopt the DevOps culture and delivers amazing features to improve the performance of the whole process.

Let's install Docker.

The easiest way to install Docker is to download the script found at https://get.docker.com:

curl -fsSL get.docker.com -o get-docker.sh

After the download is completed, we will execute the script as follows:

sh get-docker.sh

Wait for the script execution and then check the Docker installation using the following command:

docker -v

The output needs to look like the following:

Sometimes, the version of Docker can be increased, and the version should be at least  17.10.0-ce.

Finally, we will add the current user to the Docker group, and this enables us to use the Docker command line without the sudo keyword. Type the following command:

sudo usermod -aG docker $USER

We need to log out to effect these changes. Confirm whether the command works as expected by typing the following. Make sure that the sudo keyword is not present:

docker ps

The output should be as follows:

主站蜘蛛池模板: 商都县| 图木舒克市| 昌乐县| 长宁县| 沧州市| 普兰县| 抚州市| 永清县| 璧山县| 镇安县| 双鸭山市| 西贡区| 苏尼特左旗| 满城县| 郴州市| 石台县| 岚皋县| 且末县| 东乌珠穆沁旗| 通山县| 城固县| 闸北区| 赣州市| 汕尾市| 贡嘎县| 舒城县| 沙洋县| 化德县| 邻水| 黄陵县| 泗洪县| 绵阳市| 岳阳县| 兴仁县| 鄱阳县| 乌拉特前旗| 察雅县| 新和县| 西青区| 泽普县| 寻甸|