1. Install and use Docer CE This article takes CentOS 7 as an example to install the Docker CE version. There are two versions of Docker, the community version CE and the enterprise version EE. The study here takes the CE version as an example. Two installation methods are available: 1. Install using yum, 2. Automatically install using a script System requirements Docker CE supports the 64-bit version of CentOS 7 and requires a kernel version no less than 3.10. CentOS 7 meets the minimum kernel requirements, but due to the relatively low kernel version, some functions (such as the overlay2 storage layer driver) cannot be used, and some functions may be unstable. Uninstall old versions The old version of Docker is called docker or $ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine 1. Install using yum Install some necessary system tools: $ sudo yum install -y yum-utils device-mapper-persistent-data lvm2 Add software source information: $ sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo Update the yum cache: Install Docker-ce: 2. Use scripts to install automatically Make sure the yum package is updated to the latest version. In order to simplify the installation process in a test or development environment, Docker officially provides a set of convenient installation scripts, which can be used to install on CentOS systems: $ curl -fsSL get.docker.com -o get-docker.sh $ sudo sh get-docker.sh --mirror Aliyun After executing this command, the script will automatically prepare everything and install the Edge version of Docker CE on the system. 3. Start Docker 4. Verify whether the Docker service is started successfully The following figure appears to indicate successful startup 2. Use portainer graphical interface tool to manage docker Portainer is a lightweight Docker environment management UI that can manage docker host and docker swarm. The reason why it is lightweight is that there is only one container for deployment, and it can also be deployed directly using binary programs. Moreover, portainer is cross-platform and can be deployed on both Windows and Linux. 1. Start the portainer container There are two startup modes to choose from 1. Single-node operation mode docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer -d parameter runs in detach mode 2. Multi-node: portainner also supports TCP communication docker run -d -p 9000:9000 portainer/portainer -H tcp://<REMOTE_HOST>:<REMOTE_PORT> Where REMOTE_HOST is the slave ip, REMOTE_PORT is the slave port 2. Visit http://host ip:9000 After entering the page, set your username and password Then select local or remote. Here we use single node local. After logging in, the following figure is shown Summarize The above is the configuration method of Docker and portainer under Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to configure MySQL master-slave synchronization in Ubuntu 16.04
>>: JS 9 Promise Interview Questions
This article example shares the specific code of ...
The vue project built with cli3 is known as a zer...
Google China has released a translation tool that ...
FTP is mainly used for file transfer, and is gene...
A sophomore asked me how to install and configure...
Putting input and img on the same line, the img ta...
1. Introduction When the amount of data in the da...
[LeetCode] 175.Combine Two Tables Table: Person +...
This article shares the specific code of JS objec...
This article shares the specific code of JavaScri...
Table of contents Preface Why do we need to encap...
This database query statement is one of 50 databa...
1. Introduction It has been supported since versi...
Socat needs to be installed before installing rab...
Adding the extra_hosts keyword in docker-compose....