Tutorial on using portainer to connect to remote docker

Tutorial on using portainer to connect to remote docker

Portainer is a lightweight docker environment management UI that can be used to manage docker hosts and docker swarm clusters. It is so lightweight that a Docker image container of less than 100M can provide complete services.

Portainer's Hub address is: https://hub.docker.com/r/portainer/portainer/

The command to run is:

docker run -it --restart=always -d --name portainer-docker -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Install portainer

> docker pull portainer/portainer

Start protainer

>docker run -d --name portainerUI -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Visit protainer

http://Your protainer installation address:9000

Create User

insert image description here

Enter the page

insert image description here

Configure remote docker

Select Endpoints from the left menu bar

insert image description here

  • Name You give docker a name
  • Endpoint URL remote docker address port default is 2375
  • At this time, if your remote docker does not open port 2375, it will not be connected. Here is how to configure the docker port.
1. Edit docker.service
vim /usr/lib/systemd/system/docker.service
Find the ExecStart field and modify it as follows: ExecStart=/usr/bin/dockerd-current -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock 

2. Restart Docker to reread the configuration file and restart the Docker service systemctl daemon-reload
systemctl restart docker

3. Open firewall port firewall-cmd --zone=public --add-port=6379/tcp --permanent

4. Refresh the firewall firewall-cmd --reload

5. Configure the remote docker again

View the docker list

insert image description here 

Summarize

This is the end of this tutorial on how to use portainer to connect to a remote docker. For more information about portainer connecting to docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Example of portainer connecting to remote docker

<<:  A brief discussion on logic extraction and field display of Vue3 in projects

>>:  Detailed explanation of special phenomena examples of sleep function in MySQL

Recommend

How to change MySQL character set utf8 to utf8mb4

For MySQL 5.5, if the character set is not set, t...

MySQL 8.0.11 Installation Guide for Mac

MAC installs mysql8.0, the specific contents are ...

Some ways to eliminate duplicate rows in MySQL

SQL statement /* Some methods of eliminating dupl...

Example of implementing the Graphql interface in Vue

Note: This article is about the basic knowledge p...

CSS sample code to achieve circular gradient progress bar effect

Implementation ideas The outermost is a big circl...

docker-maven-plugin packages the image and uploads it to a private warehouse

Table of contents 1. Introduction to docker-maven...

Detailed explanation of common Docker Compose commands

1. The use of Docker compose is very similar to t...

Mysql multi-condition query statement with And keyword

MySQL multi-condition query with AND keyword. In ...

Sample code for implementing the Olympic rings with pure HTML+CSS

Rendering Code - Take the blue and yellow rings a...

VMware virtualization kvm installation and deployment tutorial summary

Virtualization 1. Environment Centos7.3 Disable s...

Detailed discussion of memory and variable storage in JS

Table of contents Preface JS Magic Number Storing...