Containers

Dockge Fancy Docker Stack Manager

Explore Dockge, a new Docker Stacks Manager UI from the Uptime Kuma developer for efficient Docker stack and service management

Quick Summary

  • Dockge is a new tool from Uptime Kuma creator Louis Lam that provides a really cool web interface for managing your Docker Stacks from Docker Compose code.
  • In Docker Swarm, a service defines how Docker containers behave in production on a worker node –.
  • The docker stack deploy command, combined with a Docker Compose file, initiates the deployment process with the Docker daemon.

I have been a big fan of the Uptime Kuma project by developer Louis Lam, and it is a great addition to the home lab. Louis also has a new project called Dockge, in case you have not heard about it yet. Louis describes it as “a fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager. This blog post will look into the functionalities and features of Dockge and its integration with Docker technologies like Docker Swarm, Docker Compose, and various Docker commands.

What is Dockge?

Dockge is a new tool from Uptime Kuma creator Louis Lam that provides a really cool web interface for managing your Docker Stacks from Docker Compose code. Note the following features provided by Dockge as noted from the official GitHub documentation:

FeatureDescription
Manage compose.yamlManage your compose.yaml files, providing a central point for all your Docker configuration needs.
Create/Edit/Start/Stop/Restart/DeleteIncludes options to create, edit, start, stop, restart, and delete Docker configurations, offering full lifecycle management of your Docker environments.
Update Docker ImagesStreamline updating Docker images, ensuring your containers are always running the latest versions.
Interactive Editor for compose.yamlUse an interactive editor for compose.yaml, making editing and configuration more accessible and less error-prone.
Interactive Web TerminalWork with an interactive web terminal for direct command execution and environment management.
Reactive and Real-TimeExperience a reactive interface where progress updates (pull, up, down) and terminal outputs are reflected in real-time.
Easy-to-Use & Fancy UIThe UI is easy to use and is especially appealing to those who appreciate Uptime Kuma’s UI/UX.
Convert docker run to compose.yamlConveniently convert docker run commands into compose.yaml format, simplifying the transition and maintenance of Docker commands.
File-Based StructureDockge respects a file-based structure, ensuring compose files are stored on your drive as usual. This feature allows interaction with these files using standard Docker compose commands without locking you into a proprietary format.
No File KidnappingWith Dockge, your compose files are not held hostage. They remain on your drive, easily accessible for interaction through normal Docker compose commands.
Dockge features and capabilities

You can check out the official repo here: Dockge.

What are Docker Stacks?

Let’s get a better feel for Docker Stacks. In Docker Swarm, a service defines how Docker containers behave in production on a worker node – a critical element for any application deployment. Deploying a stack in Docker, especially using Docker Compose files, involves multiple services working in tandem, a.k.a, multiple containers.

There are also special commands that you can use to work with stacks. The docker stack deploy command, combined with a Docker Compose file, initiates the deployment process with the Docker daemon. Dockge enhances this process by providing a user-friendly interface and additional functionalities to manage these deployments effectively. Note the other docker stack commands:

docker stack ls

docker stack deploy compose

Dockge makes managing these services more straightforward with the intuitive web interface, allowing users to deploy, update, and maintain their stacks easily.

Installing the Dockge container

Dockge itself is deployed using a simple Docker Compose file that you can easily pull down from the official GitHub repository.

# Create a directory to store your stacks and the Docker Compose file
# Example below
mkdir -p /opt/stacks /opt/dockge
cd /opt/dockge

On one of my lab hosts, I have a homelabservices directory. I have subdirectories under this parent directory for all my Docker Compose services. So, here, I am creating a new folder underneath my homelabservices folder.

Making the directory for the dockge installation
Making the directory for the dockge installation

Download the compose.yaml file from the official GitHub repository:

# Download the compose.yaml
curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml
Download the docker compose yaml file for dockge
Download the docker compose yaml file for dockge

Note the Docker Compose YAML file that is pulled down from the repo. ***Note*** By default, the Dockge stacks are deployed in the path: /opt/stacks. If you want to change this, you need to define the DOCKGE_STACKS_DIR environment variable and make sure your volumes /opt/stacks:opt/stacks is changed also to match.

version: "3.8" 
 services: 
   dockge: 
     image: louislam/dockge:1 
     restart: unless-stopped 
     ports: 
       # Host Port : Container Port 
       - 5001:5001 
     volumes: 
       - /var/run/docker.sock:/var/run/docker.sock 
       - ./data:/app/data 
          
       # If you want to use private registries, you need to share the auth file with Dockge: 
       # - /root/.docker/:/root/.docker 
  
       # Your stacks directory in the host (The paths inside container must be the same as the host) 
       # ⚠️⚠️ If you did it wrong, your data could end up be written into a wrong path. 
       # ✔️✔️✔️✔️ CORRECT: - /my-stacks:/my-stacks (Both paths match) 
       # ❌❌❌❌ WRONG: - /docker:/my-stacks (Both paths do not match) 
       - /opt/stacks:/opt/stacks 
     environment: 
       # Tell Dockge where is your stacks directory 
       - DOCKGE_STACKS_DIR=/opt/stacks 
How to Update

Then start the server:

# Start the Server
docker compose up -d
Running the docker compose up d command
Running the docker compose up d command

You can check your Docker Compose deployment of the Dockge container using the command:

docker-compose ps
Running docker compose ps to check the services
Running docker compose ps to check the services

Now, you should be able to visit the web address of the Docker Container host that is hosting the Dockge instance. By default, it runs on port 5001. The first thing you will need to do is create your administrator user. You can name this anything. Then, set your password and confirm it.

Create your admin user
Create your admin user

Logging into Dockge, you can see the familiar interface. Also, you will see that it recognizes we already have stacks running on the Docker host. Dockge views these as unmanaged if the Docker Compose.yml code exists outside of its directory structure underneath in your folder where you created Dockge.

Logged into dockge for the first time
Logged into dockge for the first time

Dockge information detailing the existing stack is not managed by Dockge.

Stacks not managed by dockge
Stacks not managed by dockge

Working with Dockge to deploy containers

Let’s look at how you can easily deploy containers using Dockge. Click the +Compose button on the left-hand side of the interface.

Compose a new stack using dockge
Compose a new stack using dockge

Ok let’s detail the interface when you compose a new stack and edit the containers. Note the following description numbers that correspond to the areas of the screenshot below:

  1. Containers – here you can add additional containers to your “stack.” You can also just deploy a single container if you want as well.
  2. When you click Edit on the container section here, it opens all the configuration possibilities for configuring your container, including image which you can just pull ones from Docker hub, ports, volumes, restart policy, environment variables, networks, etc.
  3. compose.yaml – This is the visual display of the compose.yaml file which you can manually edit, or you will see populated automatically as it writes the code for you based on the options you configure in section 2. Docker Compose is your best friend when it comes to managing multiple containers. You can define multi-container Docker applications, where each service can use its own Docker image, environment variables, and configuration.
  4. Networks – Here you can define and create internal networks and you can toggle on External networks
Looking at the layout of the configuration page in dockge
Looking at the layout of the configuration page in dockge

Once you deploy your stack, you will start it using the Dockge UI. I really like how it shows what is going on with everything, you can see the terminal and the status of the image pull, etc.

Running the new stack configured in dockge
Running the new stack configured in dockge

Docker Swarm and other support coming

Docker Swarm mode, a way to run containers with high availability using the Docker engine, enables the clustering of Docker nodes into a swarm. This swarm, a group of machines running Docker and joined into a cluster can easily be provisioned using docker swarm init and then managing worker nodes and services.

Under the ideas section of the official GitHub repo, this feature may be coming to the Dockge project in the future.

Features we would like to see as part of Swarm management

With Docker Swarm it would be great to have the ability to list active services (docker service ls), deploying new stacks, and remove existing ones (docker stack rm). Using the (stack deploy compose file), managing docker services within these stacks, and even handling specific docker stack services.

Frequently Asked Questions About Dockge

How does Dockge enhance Docker stack deployment?

Dockge streamlines the deployment of Docker stacks by creating an intuitive web interface for working with Docker Compose. Its interface allows users to easily manage the lifecycle of Docker stacks, from deploying application stacks with Docker Compose. The tool enables you to manage and work with multiple containers and services easily.

Can I manage existing Docker stacks with Dockge?

Yes, Dockge can work with existing Docker stacks. However, you will need to move the compose code into the Dockge directories where it keeps the stack code. It doesn’t alter the fundamental structure of Docker stacks or services, meaning you can manage both new and existing stacks.

What makes Dockge’s user interface stand out?

Dockge provides an interactive web interface and an editor for compose.yaml. It takes a page from the Uptime Kuma UI so those that know, like, and are familiar with the Uptime Kuma interface, will like Dockge.

Is Dockge suitable for managing Docker Swarm environments?

As of yet, it is not noted as being supported for Docker Swarm environments. The developer mentions this is on the short list of ideas.

Does Dockge support the deployment of complex applications?

Dockge is purpose-built to handle multi-container deployments with more complex applications. It supports the deployment of applications through compose files.

Can I use Dockge on my local machine for Docker management?

Yes, Dockge is designed to be compatible with Docker installations on local machines. Its has a file-based structure that integrates smoothly with your local Docker setup, which allows you to manage Docker stacks and services directly from your local environment.

What file formats does Dockge support for Docker configurations?

Dockge primarily works with standard Docker configuration file formats, such as compose.yaml and yml files. Its interactive editor is designed edit these file types.

Dockge Docker Stack Deploy takeaways

Dockge is a great new tool that I think many will like to get up and running in their home lab environment. With the familiarity that many have with Uptime Kuma, the Dockge project will be a great follow on to what many are already using in the lab.

The project is not as fully featured as something like Portainer with its ability to manage Swarm clusters, Kubernetes, app catalog, and many others. However, I think for a simple and easy to use Docker Compose manager, this is a great new tool that takes some of the heavy lifting out of managing your home lab and self-hosted containers.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.