You probably found yourself in a situation when building new docker image of Node.js web app (e.g. express) with the new changes takes a long time. All you wanted is to test your changes fast on a live system…
To achieve that, use docker volumes or bind mounts to map your source code on the workspace to source folder inside Node.js web app container. You can verify the changes reach the container by inspecting the source code inside the container after you make a change on docker host.
In order for node process inside the container to pick up the changes, it needs to reload. Use nodemon for that.
I wrote about it here as well.
When I did all of the above, I didn’t know automation for this exits. Use tilt!
You can find below articles useful:
- Azure-cli in Dockerfile in Alpine
- Get user’s permissions using kubectl
- Create Kubernetes Operator using Ansible
If you found this article useful, take a look at the disclaimer for information on how to thank me.