Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install docker

2025-04-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install docker, I hope you will learn something after reading this article, let's discuss it together!

1. Introduction

Docker is a bit like virtual machine technology, the virtual machine simulates all or part of the hardware and has its own operating system, while docker is not, it is just a process, this process is called container, this is called container technology, or isolation technology, it does not start another operating system, because it is too resource-consuming and too slow, it isolates the linux kernel and has its own space, for example, its own root account, disk situation, and so on. It is very lightweight, starts very fast, and one machine can start many docker container processes.

Tell me about a few application scenarios, and there's no reason why you shouldn't use it.

Front-end engineer, do not know how to configure php or java development environment

Continuous integration testing

Rapid deployment, one command, the deployment environment is exactly the same

As a nodejs programmer, do not understand php or ruby, want to deploy the application they write, a command

It is convenient to configure resources for the program, such as process monitoring and memory restrictions.

It is too slow to install software, such as mongodb, which takes a long time to download, but docker only needs one command to run.

2. Install under mac

Click here to download the latest mac installer.

Click to download the installation package and run it.

3. Install under linux

One order will do.

Curl-sSL https://get.daocloud.io/docker | sh

This command successfully installs docker on both ubuntu 14.04 and ubuntu 16.04.

After the installation is successful, you may be prompted with the following message:

If you would like to use Docker as a non-root user, you should now consideradding your user to the "docker" group with something like: sudo usermod-aG docker vagrantRemember that you will have to log out and back in for this to take effect!

Vagrant is your user name. Maybe your user name is different from mine.

It means that you can add the current user to the docker group, and it will be much easier to manage docker later, otherwise you may have to add sudo before using the docker command in the future.

If you don't add sudo, it's something like this:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.26/containers/json: dial unix / var/run/docker.sock: connect: permission denied

However, after executing sudo usermod-aG docker vagrant, you can log in again (ssh) and you can avoid adding sudo.

If the installation is successful, you need to start the docker service:

If it is a ubuntu 14.04 system, it will start automatically, or you can use the following command to start it.

$sudo / etc/init.d/docker start

If it is a ubuntu 16.04 system, use the following command:

$sudo systemctl status docker.service

It's over.

After reading this article, I believe you have a certain understanding of "how to install docker". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report