Being a DevOps Engineer was always frustrating to check docker logs and check memory and all the nitty-gritty things related to docker if you have not set up a separate monitoring or logging setup.
But after implementing and exploring this tool it made my life so much easier because this tool gives the best features related to docker with a user-friendly interface.
So let us all not waste much time and set up this amazing tool in my ubuntu system.
Prerequisites
- Ubuntu 20.04
- Docker Installed
The installation of these tools which is called Portainer is pretty simple just two commands and you are done with the installation.
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
As you can portainer is running well and fine now let us all explore this tool in depth. First of all, let me connect the Portainer with my docker.
After connecting this is the main page you’ll see. On the left-hand side, these are the options such as Endpoints in which you can add more remote docker repositories endpoints.
If I click on my local docker environment you can observe there are specifically two containers running out of which one minikube is stopped and another one which is portainer itself running.
By clicking on this running container apart from the basic things I can also do many things for instance create an image from this running container.
- Check stats of containers such as cpu usage, ram usage, etc.
- Logs
- Joining the network, duplicate container, renaming, and many more.
You can also export images as tar files in your local under the Image section.
One main advantage of using this tool is the freedom of typing commands extensively on the terminal.
Moreover, you can also visualize docker swarm nodes and services here.
You can also connect your git repository and load .env variables.
Lastly, there are also predefined templates that can you use to deploy many things like MySQL, Redis, Nginx easily onto the docker.
All the features which I mentioned here are free to use and there are more with the enterprise version. But to be honest the free version is more than enough if you do not use docker for production.
In addition to this, Portainer also provides support for Kubernetes which I will be covering this the next article so please stay tuned for that.
Hope I’ll have provided you a piece of valuable information.
Thanks.