Hostwinds Tutorials
Search results for:
Table of Contents
Tags: Linux
The cockpit is a helpful web panel used on various Linux distributions to perform administrative tasks on your server. The cockpit gives you the ability to manage Docker containers from your web browser by installing cockpit docker. This guide assumes that you have already installed Docker Engine and will walk through how to use cockpit-docker to manage containers.
Install Cockpit with the following:
sudo yum install cockpit
sudo systemctl enable --now cockpit. socket
If needed, open the firewall to the cockpit service:
sudo firewall-cmd --permanent --zone=public --add-service=cockpit
sudo firewall-cmd --reload
echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
apt-get update
sudo apt-get install cockpit
sudo systemctl enable --now cockpit. socket
sudo apt-get install cockpit
sudo systemctl enable --now cockpit. socket
Install cockpit-docker with the following:
yum install -y cockpit-docker
sudo systemctl restart cockpit.socket
sudo apt-get -y install cockpit-docker
sudo systemctl restart cockpit.socket
Finally, navigate to Cockpit at https://:9090 and log in to your server. Select the Containers to tab on the left:
Here you will find the running containers listed above all Docker images.
Additionally, the drop-down menu in the upper-left corner allows you to view everything, including exited containers.
Select Get new image:
Search for your image, select it and click Download:
You should find the image listed under Images. Select the run icon next to the image:
Here you can name your container and make other configurations. Then click Run:
To stop the container, select it:
After selecting the container, you have the option to Start. Stop, Restart, Delete or Commit. With the Ubuntu image, you will find your terminal here:
Now you can easily manage Docker containers from your web browser with an easy-to-use interface!
Written by Benjamin Bream / April 2, 2020