ACM Editorial · 2026-11-28 · 1 min read
Build reproducible images from pinned dependency definitions.
Separate build and runtime
Build reproducible images from pinned dependency definitions. Use a smaller runtime stage where practical and avoid shipping unnecessary build tools. Do not place API keys or database passwords in image layers.
Persist important data
Containers are replaceable. Database files, uploads and private documents need persistent volumes or external storage. Identify which directories must survive a restart and test that backups include them.
Configure health and networking
Expose only the required service ports, keep internal database endpoints private and configure health checks that reflect service readiness. Use HTTPS through an appropriately configured reverse proxy.
Test upgrades and rollback
Deploy a candidate image to a staging environment with representative data. Apply migrations under a documented process and verify forms, file uploads and background jobs. Rolling back code does not necessarily reverse database migrations.

