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.