Learn how ServerCat makes it easy to deploy a container to one or more Docker hosts with batch execution.
ServerCat is one of my favorite tools for remotely accessing and monitoring Linux servers. With a beautifully designed user interface and user-friendly structure, anyone can use this tool to access remote Linux servers.
But ServerCat has a few other tricks up its sleeve. One such trick is the ability to batch run Docker deployments to any supporting server you have connected. With a single command, you can deploy containers to all of your Docker servers and then monitor them to make sure they work as expected. I’ll show you how easy it is to do that by batch deploying an NGINX container to multiple servers hosting Docker containers.
TO SEE: Rental Kit: Back-end Developer (Tech Republic Premium)
What you need to deploy a container with ServerCat
You have installed ServerCat on a macOS device and have at least one Linux host connected running Docker.
Deploy a container with ServerCat
Before we get into that, you should know that deploying a container with ServerCat isn’t quite a point and click, as you need to know how to deploy that container through the command line. I’ll demonstrate an NGINX container implementation, which is relatively simple.
The first thing you need to do is open ServerCat on your macOS device. From the main window, you should see the Run entry in the left navigation (Image A).
Image A

In the run screen (Figure B), you will see a list of all available hosts, the run command field, and the run button at the top.
Figure B

This is not only used for deploying containers; for example, you could also run sudo apt-get upgrade -y
on any Ubuntu based server. But for this demonstration we use a container.
At the top, select all the Docker servers where you want to deploy the container. Then, in the Run command field, type:
docker run --name docker-nginx -p 8080:80 -d nginx
With everything on it (Figure C), click Run to deploy the container to the selected hosts.
Figure C

As you can see in it Figure Done implementation succeeded, the other failed.
Figure D

If I go to Hosts and double click on the Docker Swarm entry I can run docker ps -a
to discover that port 8080 is already busy, which caused the error (Figures E).
Figures E

Then I can try another implementation with a different remote port with the command:
docker run --name docker-nginx2 -p 8081:80 -d nginx
We need to rename docker-nginx to docker-nginx2 because the first name is already taken. That command will succeed and our NGINX container will be deployed on our Docker Swarm host.
Simple Docker implementation
While ServerCat container deployment isn’t a full point-and-click affair, it does make it easy to run containers on multiple remote Docker nodes and then monitor those containers. Knowing the basics of Docker CLI implementation, ServerCat helps make deploying and monitoring those containers a little easier. Give this all-in-one tool a try and see if it doesn’t become your favorite way to batch run containers to your Docker servers.
Continue your IT training with this The Linux & Docker coding bundle from TechRepublic Premium.
Subscribe to TechRepublic’s How to make technology work on YouTube for all the latest technical advice for business professionals from Jack Wallen.