r/nextjs•
vvrider

Single docker image for all environments

Help

Hey!

Wondering if someone implemented this in production & has some tips

We have a nextjs SSR project, right now building the Docker images separately per each individual environment (as build time variables are baked into docker image during build process)

What we would like to do, is to create a single docker image and promote it across envs
In order to speed up pipelines, and have a single artifact

So far, there is little concrete & practical information on this topic

The best i've seen in reddit, people suggested some startup scripts that static build will somehow "pick-up"

Thanks in advance!

Posted Oct 10, 2025, 7:18 PM UTC

11
Loading comments…