How can I create a repeatable Ghost development environment using the official Docker image and version‑locked dependencies?
0 reputation · 16 May 2023, 11:24 UTC
Goal: establish a Ghost development environment that can be reproduced identically on any machine or CI pipeline by using the official Ghost Docker image and adding custom theme code with fixed Node and npm versions.
Constraints: the solution must avoid manual host‑side Node installations, work across Linux, macOS, and Windows, keep the image size reasonable, and preserve Ghost’s hot‑reload capability during theme edits.
Questions: What is the recommended way to bake a specific Node version into the Ghost Docker image? How can npm lockfiles be persisted across rebuilds without breaking hot reload? Should I extend the official image via a multi‑stage Dockerfile or use a Dockerfile that runs npm ci?