Meituan Automated Build System: Docker‑Based CI/CD
Meituan’s new Docker‑based automated build system isolates each build in lightweight containers, using YAML‑defined images to compile code, preprocess assets, and package artifacts, which speeds builds, eliminates environment conflicts, and delivers pre‑built packages for faster, more reliable releases across the platform.
The automated build system evolved from Meituan's deployment platform. After a developer pushes code, the system creates a Docker container based on a custom YAML build configuration, compiles source (Java, C++, Go, etc.), preprocesses assets (JavaScript, CSS), compresses resources, and produces a deployable package.
Background
Meituan's central release node handles code fetching, building, and uploading. Rapid business growth caused three main issues: environment conflicts when multiple applications share a VM, resource contention slowing builds, and buggy build scripts affecting the release machine.
For example, a slow PHP release was traced to concurrent Java builds consuming CPU.
Principle
Developers configure auto‑build in Stash; commits trigger the system, which creates build tasks and enqueues them in a Django‑rq queue. A YAML file (simpler than a Dockerfile) specifies the base image, environment variables, and build commands. The system pulls the image from a private registry, launches a Docker container, and runs the build inside.
Successful builds are uploaded to Meituan Storage Service (MSS); release engineers then pull the pre‑built package, eliminating on‑the‑fly compilation.
Why Docker?
Docker provides isolated, lightweight containers that can be created and destroyed quickly, avoiding the overhead of provisioning full VMs in Meituan Cloud and preventing build failures from affecting other applications.
Benefits
Isolation of build environments eliminates conflicts.
Distributed containers reduce resource competition and speed up builds.
Build failures are contained, preserving the stability of the central release node.
Pre‑built packages shorten release time, improving agility and user experience.
Developers can customize environments via YAML, benefiting front‑end teams that need frequent updates.
Conclusion and Outlook
The feature is optional today, maintaining compatibility, but it marks Meituan's first production use of Docker. Future plans include extending Docker to development, testing, and deployment stages.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Meituan Technology Team
Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
