Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: Docker



Build your home data center using Docker Swarm Mode!

This article provides a detailed overview of the complete process and core concepts for building a Docker Swarm cluster. First, by configuring hostnames, installing Docker, and initializing the Swarm cluster, it addresses Overlay Network compatibility issues in vSphere environments, successfully establishing a highly available architecture with either one manager and two workers or all managers. Next, it deploys the open-source graphical interface Swarmpit for intuitive cluster state management and provides an in-depth analysis of the hierarchical relationships and interaction logic among Stack, Service, Task, Node, Volume, and Network. The article offers command-line management tips for these core resources, including deployment, monitoring, log viewing, and node maintenance operations. Finally, it demonstrates how to quickly deploy real-world business applications using YAML files, introduces solutions for implementing automated HTTPS with Caddy and building shared storage with GlusterFS, and provides a Systemd service script to ensure nodes automatically come online after a reboot, offering comprehensive and practical guidance for container orchestration in production environments.

Views 715
Cluster Container Docker Docker Swarm Linux Server Swarmpit bash

Deploy a standalone Docker application on the server

This article provides a detailed overview of the complete process and best practices for deploying and managing Docker containers in a virtual machine. First, it guides users on configuring GPG keys to support the Pass password manager and setting up Docker credential storage to enable passwordless login for Docker Desktop. Second, it emphasizes the planning of persistent container volumes, highlighting the importance of mounting host directories to ensure data consistency and sharing. It also provides configuration references for commonly used containers and scripts for running them as non-root users. Additionally, the article explains port mapping, using restart policies to ensure containers start automatically with the host, and safely upgrading containers by deleting and recreating them. For scenarios involving multiple container dependencies, it recommends using Docker Compose to define service networks and volumes, combined with systemd for automated management. Finally, the article summarizes the need to manage the VM and containers separately in hybrid deployments and suggests a gradual transition to a containerized architecture to ensure system stability and maintainability.

Views 413
Container Docker Linux Ubuntu VM bash