When looking to develop in a Docker container, it is tempting to start making changes to your existing Dockerfile and image. But this is not a recommended approach.
Instead, building a development version of a Docker image is going to provide better options for both development and production.
To get started, this episode will walk you through the process of creating a development version of a Docker image, using a production image as the base.
You'll see how mounting a volume from the host computer into a Docker container makes it easy to edit files, and also how this facilitates “npm install” for development purposes, when working with Node.js
The end goal in this episode is to have a basic development image that allows you to edit your npm dependencies without having to rebuild the container every time.