Docker is a software platform designed to make it easier to create, deploy, and run applications by using containers. It offers OS-level virtualization to deliver software in packages called containers.
Docker compose is a tool for running multi-container applications on Docker.
Installation:
# 1. Pull the latest version:
sudo docker pull portainer/portainer-ce:latest
# 2. Run this container.
sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
We define the ports we want Portainer to have access to, a name (“portainer”), and we also tell the Docker manager that we want to restart this Docker if it is ever unintentionally offline.
Use: Firstly, open your favorite browser and type the following:
http://[PI_ADDRESS]:9000 # If you don't remember your PI's IP address, type: hostname -I
Secondly, upon launching Portainer’s web interface, you will need to create an admin account.
What sort of container environment we want Portainer to manage? Select Docker. Click on Containers and you will be presented with a list of containers currently set up on your device. If you want to add a new one, click the Add container button.