blog-image

Jul 03, 2017

9 min read

Using Portainer To Manage Your Docker Containers Easily

Written by

Vippy The VPS

We hope that with all the Docker tutorials and our self-hosting handbook, we hope that many you are practically swimming in Docker containers. Docker makes the task of running a lot of applications on a single VPS a lot easier, but even if you run just a few Wordpress blogs, you'll end up with 6, 8, 10, or more containers running concurrently. No matter how intelligent your naming scheme, the sheer volume makes managing them tricky.

Enter Portainer, which bills itself as a lightweight management UI for easier management of a Docker host or Swarm cluster. It's a single container that can run on any Docker host, and helps you manage all of your containers, images, volumes, networks, and more.

In this tutorial, we'll cover the process of installing Portainer, and figure out how to do some basic maintenance.

Prerequisites

[cta_inline]

Step 1. Installing Portainer

Because Portainer runs inside of a Docker container itself, installation is pretty straightforward. Although you don't have to set up Portainer so that it forces SSL over connections to the web portal, that's the method we're going to cover—simply put, if you're using Portainer to manage production Docker containers, you'll want to ensure that connections are secure. Plus, it's just good practice.

We're also going to set up Portainer so that data can be persisted between reboots.

This is more complex than the baisc installation process docker run -d -p 9000:9000 portainer/portainer, but will be safer and more maintainable.

Creating SSL keys

Before we can move forward, let's create the keys necessary to run Portainer in SSL mode. When you enter the final command, you'll be asked to input some information about how to sign the key, which you can fill out to your discretion.

Note: If you're running Portainer on a production machine, you probably already have (signed) SSL certificates available to use instead of these self-signed ones. Or, if you don't have them already, you can set up something like Certbot. However, for the sake of simplifying this tutorial to accommodate the most installations, we'll just cover self-signed certificates.

$ mkdir local-certs &&
Continue reading this article
by subscribing to our newsletter.
Subscribe now

A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.

If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.

Leave a Reply