zach.codes

zach.codes

One Dockerfile for Production and Development

Zach Silveira
Nov 14, 2017
∙ Paid
Share
One Dockerfile for Production and Development

Too many intro to Docker tutorials create multiple Dockerfiles for each environment, or only go over creating one environment. Here's a quick and easy way to keep a single file and overwrite the command in development.

Let's look at an example Dockerfile for building a react app and copying it over to nginx:

FROM node:latest

COPY package.json package.jso…

Keep reading with a 7-day free trial

Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Zach Silveira
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture