You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
556 B
Markdown

# PORTAINER 安装
> 前提 : docker 和 docker-compose 都已准备完成。
## 配置文件
创建路径
```shell
mkdir -p /usr/local/portainer/data
```
## COMPOSE 文件
```shell
cat > /usr/local/portainer/docker-compose.yml <<'EOF'
version: '3'
services:
portainer:
restart: always
image: portainer/portainer-ce
container_name: portainer
ports:
- 9004:9000
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
EOF
```
## 启动
```shell
cd /usr/local/portainer/ && docker-compose up -d
```