Use Docker Compose to install the Docker visual management tool portainer (including x86 and arm64 platform offline installation packages and usage tutorials)
Introduction
This article will introduce in detail how to use Docker Compose to install the Docker visual management tool portainer, including x86 and arm64 platform offline installation packages and their usage tutorials.
Related article reference:
Installation tutorial of Docker and Docker Compose under Linux operating system (including offline one-click installation resource package for x86 and arm64 platforms)
Using Docker Compose to install Harbor mirror warehouse
The version is as follows
name | Version |
---|---|
Portainer | 2.18.4 |
CentOS | 7.6+ |
Docker | 20.10.22 |
Docker Compose | 1.23.1 |
1. Online installation
1.1 Data persistence
# 创建持久化文件夹
[root@localhost home] mkdir -p portainer
[root@localhost home] ls
harbor portainer
[root@localhost home] cd portainer/
[root@localhost portainer] mkdir -p ortainer_data
[root@localhost portainer] ls
ortainer_data
[root@localhost portainer]#
1.2 Create docker compose file
The portainer image name under the arm64 platform must be changed to portainer/portainer-ce:linux-arm64
#创建docker compose文件
[root@localhost portainer] vim docker-compose.yml
The specific contents are as follows:
version: "3"
services:
portainer-main:
container_name: portainer-main
image: portainer/portainer-ce # arm64 须改为 portainer/portainer-ce:linux-arm64
ports:
- "9026:9000"
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
- ./ortainer_data:/data:rw # 映射到上面创建的持久化文件夹
1.3 Installation and use
# 执行安装
[root@localhost portainer] docker-compose up -d
Creating portainer-main ... done
[root@localhost portainer]#
The browser
needs to set a password when accessing the host IP:9026 for the first time.
After setting the password, you will automatically jump in. Click here to get started.
If the password is not set in time, the following page will appear when accessing.
Execute docker restart portainer-main and access again.
[root@localhost portainer] docker restart portainer-main
portainer-main
[root@localhost portainer]
2. Offline installation
The password for the offline package has been set.
Account/password: admin/123456789123
2.1 Download resources
1.x86 platform click to download
2.arm64 platform click to download
2.2 Installation tutorial
x86 platform:
# 解压
tar -xzvf portainer-ce.x86.tar
cd portainer
# 导入镜像
docker load -i portainer-ce.x86.2.18.4.tar
# 安装
docker-compose up -d
arm64 platform:
# 解压
tar -xzvf portainer-arm64.tar
cd portainer
# 导入镜像
docker load -i portainer.arm.2.18.4.tar
# 安装
docker-compose up -d
Browser access host IP:9026
Account/password: admin/123456789123
Recommended articles:
Commonly used basic commands for Docker,
common commands for Docker batch cleaning and deletion of images and containers,
installation tutorial of Docker and Docker Compose under Linux operating system (including offline one-click installation resource package for x86 and arm64 platforms),
using Docker Compose to install Harbor image warehouse