Docker Deployment, End to End: Building, Pushing, and Running Containers with Harbor
This is a concrete reference for teams that need a private image registry and production rollback capability, showing how to bridge the gap between building on a Mac and running on an amd64 server, and how to keep secrets out of images while still passing configuration at runtime.
A practical walkthrough covers the whole Docker deployment chain: prepare a Linux server with firewall rules, install the BT panel and Harbor image registry, then build and push a frontend image using buildx with the right platform flag. The two-stage Dockerfile compiles a Vue app with Node and serves the static output through Nginx, with a proxy configuration that handles API streaming, uploads, and Vue Router fallback.
The backend follows a similar path but keeps secrets out of the image by loading them from a server-side .env file via --env-file. The guide also details how to make Docker accept an HTTP-only Harbor registry on an intranet, how to use host.docker.internal to reach host services from containers, and why production images should be tagged with commit or date versions instead of latest. A final rollback procedure relies on pulling an older image from Harbor or rebuilding from old code.
The guide treats HTTPS for Harbor as mandatory in production, while demoting HTTP to an isolated intranet experiment, a sensible stance given plaintext credential transmission.
Rollback is framed as the primary safety net: start an old image if the new version fails, and rebuild from old code only when no old image exists, making persistent image versioning a core operational habit.
Opening only required ports and using host.docker.internal for container-to-host access reduces the attack surface and simplifies service wiring without extra network configuration.
The explicit read timeout of 600 seconds and streaming-friendly proxy settings reflect a real-world need to support AI agent backends, not just static web apps.