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

Mysql timeline data to obtain the first three data of the same day

Create table data CREATE TABLE `praise_info` ( `i...

Summarize the commonly used nth-child selectors

Preface In front-end programming, we often use th...

JavaScript canvas to load pictures

This article shares the specific code of JavaScri...

Detailed steps to configure MySQL remote connection under Alibaba Cloud

Preface As we all know, by default, the MySQL ins...

Example of troubleshooting method to solve Nginx port conflict

Problem Description A Spring + Angular project wi...

Detailed tutorial on installing JDK1.8 on Linux

1. Cleaning before installation rpm -qa | grep jd...

Best Practices for Deploying ELK7.3.0 Log Collection Service with Docker

Write at the beginning This article only covers E...

Detailed explanation of JavaScript prototype chain

Table of contents 1. Constructors and instances 2...

Solution to forget password when installing MySQL on Linux/Mac

Preface This article mainly introduces the releva...

How to connect XShell and network configuration in CentOS7

1. Linux network configuration Before configuring...

How to install Android x86 in vmware virtual machine

Sometimes you just want to test an app but don’t ...

Mini Program to Implement Paging Effect

This article example shares the specific code for...

Detailed Example of CSS3 box-shadow Property

CSS3 -- Adding shadows (using box shadows) CSS3 -...

Today I will share some rare but useful JS techniques

1. Back button Use history.back() to create a bro...