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 use docker graphical management tool Portainer

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

Share

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

This article mainly shows you "docker graphical management tool Portainer how to use", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "docker graphical management tool Portainer how to use" this article.

The Construction of docker basic Environment

Use the wget tool to download the yum source from the docker official website:

Wget-P / etc/yum.repos.d/ https://download.docker.com/linux/centos/docker-ce.repo

Update yum source cache

Yum makecache fast

Install Docker

Yum-y install docker-ce

Start Docker and set boot up

Systemctl start dockersystemctl enable docker modifies docker mirror source-so docker pull speed will be fast

Add the following parameters to the / etc/docker/daemon.json file (create a new one without the file)

{"registry-mirrors": ["https://9cpn8tt6.mirror.aliyuncs.com"]}"

Service restart:

Systemctl daemon-reloadsystemctl restart dockerdocker common commands

Find the Centos image file in Docker

Docker search centos

Download the Centos image file in Docker (download the latest version by default)

Docker pull centos

View mirrored files on the system

Docker images

View all containers in the system

Docker ps-all

Enter the container command line

Docker exec-ti container ID / bin/bash

Delete containers (only stopped containers can be deleted)

Docker rm Container ID

Force deletion of container

Docker rm-f container ID

Delete an image file

Docker rmi image file ID

Get container information

Docker inspect Mirror ID

Check the container IP address

Docker inspect 'Container ID' | grep IPAddress

View container mapping port

Docker port Container ID

Create a container

Docker run#-a stdin: specify the standard input and output content type, optional STDIN/STDOUT/STDERR; #-d: run the container in the background and return the container ID;#-I: run the container in interactive mode, usually used in conjunction with-t; #-t: reassign a pseudo-input terminal to the container, usually used with-I #-name= "nginx-lb": specify a name for the container; #-- dns 8.8.8.8: specify the DNS server used by the container, which is the same as the host by default; #-- dns-search [example.com] (http://example.com/): specifies the container DNS search domain name, which is the same as the host by default; #-h "mars": specify the hostname;#-e username= "ritchie" of the container: set the environment variable #-- env-file= []: read the environment variable from the specified file; #-- cpuset= "0-2" or-- cpuset= "0Magne1Grain2": bind the container to the specified CPU to run; #-m: set the maximum memory used by the container; #-- net= "bridge": specify the network connection type of the container, supporting bridge/host/none/container: four types; #-- link= []: add a link to another container #-expose= []: open a port or a group of ports

Download Portainer image

# query which Portainer images are currently docker search portainer

# Select the first one, download the image docker pull docker.io/portainer/portainer and run Portainerdocker run-d-p 9000 restart=always-v / var/run/docker.sock:/var/run/docker.sock-- name prtainer-test docker.io/portainer/portainer

This statement associates port 9000 in the container with host port 9000 and names the container portainer-test. After executing the command, you can access Portainer using the machine IP:PORT.

Access method: http://IP:9000

You need to register the user for the first login, and set the password for the admin user.

Select local here in the stand-alone version. After selection, click Connect to connect to the local docker.

You can see it when you come in. Put some pictures below to feel for yourself.

These are all the contents of this article entitled "how to use Portainer, a graphical management tool for docker". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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