Easily Manage Your Docker Compose Projects with Dockage

Publish: 2024-04-30 | Modify: 2024-04-30

Dockge is a sophisticated and easy-to-use container management tool designed specifically for Docker Compose projects. This open-source software not only converts Docker commands into docker-compose.yaml files, but also automatically generates compose.yaml configuration files based on web forms, greatly improving the efficiency and convenience of developers and Linux operators.

9462ef940eed76a9.png

System Requirements

  • Docker version >= 20 or use Podman
  • Supported operating systems include: Ubuntu/Debian/Raspbian/CentOS/Fedora/ArchLinux
  • Supported architectures include: armv7, arm64, amd64

Installing Dockge

Before installing Dockge, make sure that your operating system and Docker version meet the installation requirements. Then, use Docker Compose for installation, and the docker-compose.yaml content is as follows:

version: "3.8"
services:
  dockge:
    image: louislam/dockge:1
    restart: unless-stopped
    ports:
      - 5001:5001
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/app/data
      - /opt/stacks:/opt/stacks
    environment:
      - DOCKGE_STACKS_DIR=/opt/stacks
  • ./data: Dockge data storage directory, it is recommended to use absolute paths

It is important to note the /opt/stacks directory. If your container's docker-compose.yaml file structure is as follows:

/opt/stacks/
├── app1/
│   └── docker-compose.yaml
├── app2/
│   └── docker-compose.yaml
├── app3/
│   └── docker-compose.yaml

Dockge will scan all docker-compose.yaml files under /opt/stacks/ and display app1/app2/app3 in the web interface.

Using Dockge

After installing Dockge, access it by entering http://IP:5001. The first time you access it, you will be asked to set up a username/password.

ed15d07c5bd0c2d8.png

In the Dockge backend, you can see a clear and reasonable layout. The left side is the container list, the middle is the container operation options, and the right side displays the content of the docker-compose.yaml file.

089752d63a1c1826.png

Dockge can also convert Docker commands to Compose's yaml file.

91f0e0c323acb324.png

Furthermore, if you have deployed Dockge on multiple servers, you can configure a proxy on one Dockge service to centrally manage Dockge services on multiple servers from a single location. However, enabling the proxy will display all servers' containers on the left side of the interface, which may make it difficult to distinguish when there are a large number of containers.

c9abfc6bfe5c1e84.png

Some Considerations

After using Dockge for a while, it was found that although the tool brings convenience, there are also potential risks that may lead to data loss if not careful. Here are some important considerations:

Avoid using relative paths

When using Dockge, it is recommended to use absolute paths when mounting data directories instead of relative paths. Relative paths may lead to uncertainty about the actual mount location, which may result in data loss. Always using absolute paths is the safer approach!

Be cautious when deleting containers through Dockge

When you delete a container through Dockge, this operation will delete all data under the /opt/stacks/app1 directory, including the .yaml and .env files. Therefore, if you want to keep these files, avoid deleting containers through Dockge and try to avoid mounting data in the /opt/stacks directory. In this regard, there is room for improvement in Dockge, such as providing relevant prompts or avoiding the automatic deletion of this important data.

Conclusion

In summary, Dockge greatly simplifies the management of Docker Compose projects and provides an effective way to operate and manage containers. Although it is powerful, attention to data security is required when using it. Hopefully, future versions will further optimize to better meet the technical needs of the community and improve user experience.

Dockge project link: https://github.com/louislam/dockge


Comments