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

  • 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:

主站蜘蛛池模板: 金山区| 宝鸡市| 敦煌市| 浦东新区| 密山市| 孟州市| 平昌县| 家居| 滨州市| 呼和浩特市| 金沙县| 东莞市| 荆门市| 红原县| 桓台县| 北安市| 黎平县| 蚌埠市| 台安县| 乌海市| 米易县| 安图县| 崇信县| 治县。| 始兴县| 辽源市| 荃湾区| 梧州市| 广灵县| 墨脱县| 涿鹿县| 枣庄市| 大姚县| 河东区| 新民市| 义乌市| 云浮市| 灵山县| 安多县| 聂拉木县| 长春市|