Hostwinds Tutorials

Search results for:


Table of Contents


Prerequisites:
Step 1 – Install Cockpit
CentOS 7 (Cockpit is Included)
Debian 9
Ubuntu 17.04 and Later (Cockpit is Included)
Step 2 – Install cockpit-docker
CentOS 7
Debian/Ubuntu
Step 3 – Manage Docker Containers with Cockpit
Pulling, Running, Stopping, Starting, and Restarting a New Image:

Installing and using cockpit-docker (Linux VPS)

Tags: Linux 

Prerequisites:
Step 1 – Install Cockpit
CentOS 7 (Cockpit is Included)
Debian 9
Ubuntu 17.04 and Later (Cockpit is Included)
Step 2 – Install cockpit-docker
CentOS 7
Debian/Ubuntu
Step 3 – Manage Docker Containers with Cockpit
Pulling, Running, Stopping, Starting, and Restarting a New Image:

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.

Prerequisites:

  • An updated server.
  • Docker Engine installed on your server. If not installed, you can follow our guides to install on CentOS, Debian, or Ubuntu. If you are not sure, you can verify using:
    • docker --version

Step 1 – Install Cockpit

Install Cockpit with the following:

CentOS 7 (Cockpit is Included)

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

Debian 9

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

Ubuntu 17.04 and Later (Cockpit is Included)

sudo apt-get install cockpit
sudo systemctl enable --now cockpit. socket

Step 2 – Install cockpit-docker

Install cockpit-docker with the following:

CentOS 7

yum install -y cockpit-docker
sudo systemctl restart cockpit.socket

Debian/Ubuntu

sudo apt-get -y install cockpit-docker
sudo systemctl restart cockpit.socket

Step 3 – Manage Docker Containers with Cockpit

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.

Pulling, Running, Stopping, Starting, and Restarting a New Image:

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