Moonglade

Modern Markdown blogging with AI-powered localization and search.

All Posts



Run Linux Desktop experience in Docker container

This article provides an in-depth analysis of the key software package dependencies required to run a Linux desktop environment within a Docker container. It begins by identifying `gnome-shell` as a core component, noting that its dependencies include specific configurations such as the Ubuntu wallpaper. The article then clearly distinguishes between the roles of `gnome-core` and `ubuntu-desktop`, explaining that Ubuntu installs the latter by default rather than the former, and lists core application dependencies, including the file manager, terminal, and settings center. Additionally, it highlights Ubuntu-specific GNOME Shell extensions, such as `ubuntu-dock` for the taskbar, application indicator support, and desktop icon management tools. Finally, it compares the dependency differences between `ubuntu-desktop-minimal` and the standard `ubuntu-desktop`. The former provides a basic environment for minimal installations, while the latter adds more standard components on top of that foundation. By mapping out these dependency chains, readers can clearly understand how to build a fully functional yet lightweight Linux desktop environment in Docker, enabling convenient testing and experience of the desktop system without the need for a local installation.

Views 976
Docker Gnome Linux Remote Management Ubuntu desktop



The 3rd Anduin Programming Contest

This article introduces the "Introductory File System and RAID" competition problem, which requires participants to develop a complete file system using specified languages such as C, C++, Rust, or Go. Submissions must include source code and binary files, support formatting real or virtual disks into the `myfs` file system, and implement features such as mounting and automatic mounting via `/etc/fstab`. Core functional requirements include file creation, deletion, modification, and retrieval; permission control; and space reporting. Additionally, participants must implement software RAID 0, RAID 1, and RAID 5, while ensuring compatibility with various storage devices such as SATA, NVMe, and USB. The grading criteria focus on read and write performance on solid-state drives and mechanical hard drives, crash recovery capabilities (such as the Copy On Write mechanism), RAID performance improvements, and the ability to run a complete Linux system as the system disk. The article recommends that beginners start with the FUSE interface to reduce implementation difficulty. It also specifies that code must be submitted under the MIT license to a designated repository by the deadline of September 1, 2024. Final awards for first, second, and third place will be selected based on feature completeness and production significance, with prizes including a Minisforum 10G small form factor PC, a Dell small form factor PC, and an electric toothbrush.

Views 461
Cross Platform FUSE File System Raid0 Raid1 Raid5

Web Application Development Checklist

This document comprehensively outlines the best practices framework for building highly available, secure, and efficient web services. At the security level, it emphasizes enabling modern encryption protocols such as TLS 1.3, HSTS, and OCSP Stapling, and strictly configuring CSP, Rate Limiting, and firewall rules to defend against XSS, DDoS, and brute-force attacks. In terms of network and system configuration, it recommends optimizing TCP congestion control algorithms, minimizing port exposure, disabling root password login, and reducing risks through SELinux and file permission controls. From an operations perspective, it is necessary to establish robust monitoring and alerting, snapshot backup, and automated scaling mechanisms to ensure rapid recovery of business continuity during failures or traffic spikes. In the DevOps workflow, static code analysis, unit testing, and containerized deployment should be integrated via CI/CD pipelines, leveraging Docker and Kubernetes for flexible scaling. The core of application development lies in eliminating underlying defects such as memory leaks, deadlocks, and SQL injection to ensure code quality. Additionally, attention must be paid to user experience, including responsive layout, multi-language and timezone support, and PWA compatibility, while strictly adhering to global and local compliance requirements such as GDPR and the Personal Information Protection Law, thereby achieving dual assurance of technical architecture and business value.

Views 544
Cloud Container Development Linux Server Service Web

Ubuntu 22.04 Network Diagnostic Handbook

This article introduces a complete process for troubleshooting unknown network traffic and bandwidth usage issues in an Ubuntu system. First, use `ip link show` to identify the network interface to be monitored. Then, utilize tools such as `dstat`, `iftop`, and `nload` to monitor overall network traffic and bandwidth usage on specific interfaces in real time. To pinpoint the source of resource consumption, the article recommends using `nethogs` to view traffic by process. It also notes that when a process ID appears as unknown (such as processes inside Docker containers), you should switch to using `tcpdump` to capture and analyze specific network packets. Next, use the `ss` command to check the occupancy status of specific ports, and combine it with the `ps` command to confirm the corresponding process ID and the location of the executable file. Finally, for identified anomalous IP addresses, the article guides you to use `iptables` and `ip6tables` commands to block inbound and outbound traffic. It particularly emphasizes that for IPv6 addresses, since attackers can easily change their addresses, it is recommended to block the entire subnet to enhance defense, thereby helping users effectively diagnose and resolve abnormal network bandwidth issues.

Views 2,099
Linux Netplan Network NetworkManager Networkd Ubuntu


Setup a Ubuntu apt mirror server

Ubuntu Mirror Why do this? I have many Ubuntu servers in my own data center at home. They need to update software packages every week. However, if every server connects to the Ubuntu official source, it will waste a lot of bandwidth. Therefore, I decided to set up an Ubuntu mirro...

Views 1,593
Cache Linux Mirror Server Ubuntu Web apt

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 703
Cluster Container Docker Docker Swarm Linux Server Swarmpit bash