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

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:

主站蜘蛛池模板: 武宣县| 福州市| 志丹县| 夏津县| 通江县| 大姚县| 白玉县| 松阳县| 诏安县| 平乡县| 通海县| 桐柏县| 焉耆| 南宫市| 芜湖市| 石泉县| 屏南县| 益阳市| 鸡东县| 丹东市| 璧山县| 舒兰市| 韶山市| 司法| 临沂市| 喜德县| 合水县| 永济市| 蒙城县| 固安县| 翼城县| 杨浦区| 仙桃市| 宣汉县| 蒙自县| 荆州市| 津市市| 闵行区| 家居| 宣武区| 南丹县|