Installing Portainer for managing Docker instances

Just perform the following steps:

1) Create a volume to persist your settings:

docker volume create portainer_data

1) Run the docker command to create the container and inform some initial configuration parameters:

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

With this command we are telling Docker to run this container in the background mode, export port 9000, set the name to portainer, set the restart policy to always restart and link the container volumes to local volumes on your machine.

After executing the command, just access http://localhost:9000 and set the admin password.

The next step is to point which environment you want to manage, in my case I will select the local docker instance.

And that's it, you'll have the lists of active containers, their status and possible available actions.

35