Portainer
Portainer
Portainer is a management interface for containers. Meanwhile, the container management GUI can also launch Docker Compose files via stacks.
Installation
- Asustor
- Linux
- Synology
mkdir portainer
cd portainer
mkdir data
touch docker-compose.yml
version: "3.7"
networks:
proxy-network:
external:
name: proxy-network
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
restart: unless-stopped
networks:
- proxy-network
# ports:
# - "9000:9000"
security_opt:
- no-new-privileges:true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/localtime:/etc/localtime:ro
- ./data:/data
docker compose up -d
Portainer can be easily downloaded from the App Central here.
First, portainer/portainer-ce needs to be downloaded from the Docker Registry.
Then, a folder is needed where portainer's data can be persistently stored.
Finally, in the task scheduler, a custom script without schedule or activation needs to be created. The following code should be used:
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer/data:/data portainer/portainer-ce
In the script, the path ("/volume1/docker/portainer/data") to the folder must be adjusted. Once the task is created, it must be executed once executed.
info
If necessary, the connection to the host portainer
with the port number 9000
must still be established in the Proxy Manager. Other option is to publish port 9000, you have to uncomment this line in the Docker Compose file.
Docker compose files can be started under stacks
.