Skip to content

Docker Portainer

Mattias Martikainen edited this page Jun 16, 2017 · 7 revisions

Portainer is an open-source management UI which allows you to manage your docker host/cluster from a webpage, can be handy to have for checking your containers from your cellphone or doing an easy restart when needed.

Adding Portainer to your docker Environment

One of the many features of docker is that your applications are only a few clicks away, there is no need for installing loads of packages and compiling the software, everything is already prepared and ready to be started on your host.

The images that exists out there are started with specific parameters which is the only settings we need.

To start using portainer we only need two commands, we start with creating a container for it, with the settings we want.

docker create --name=portainer --restart=always -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v /Docker/Portainer:/data portainer/portainer

Explanation

  • docker create --name=portainer Creating a new container with the name "portainer"

  • --restart=always makes the container start on boot

  • -p 9000:9000 Binding the hosts external port (9000) to the containers internal port (9000)

  • -v /var/run/docker.sock:/var/run/docker.sock Command needed to control your docker host

  • -v /share/Docker/Portainer:/data Mounting the data files on the container to a local path (/home/pi/data) where all configuration will be stored, this way you can delete the container without loosing your configuration

Accessing portainer

Open your browser and go to http://yourip:9000

  • you will recieve a prompt to set an administrator password.
  • Choose a password and click next
  • Use the new password to login
  • Choose the first option, control docker on a single host

And now you are up and running! Feel free to browse around and get used to the gui.

Links

Clone this wiki locally
You can’t perform that action at this time.