Writing a Good Node.js Dockerfile
March 28, 2023
Categories: Tags:TL;DR: Tutorials often show simplistic, naive Dockerfiles. We can do better.
...TL;DR: Tutorials often show simplistic, naive Dockerfiles. We can do better.
...TL;DR: The simplest possible example to demonstrate the difference between Docker’s CMD and ENTRYPOINT instructions:
...TL;DR I set out to build the smallest container image that I could that was still able to do something useful. By taking advantage of multistage builds, the scratch
base image, and a tiny assembly-based HTTP server, I was able to get it down to 6.32kB!
TL;DR: Configuring Cloud Build to automatically handle Continuous Integration and Continuous Deployment for this site based on Git triggers ended up being a bit trickier than I would have expected.
...Alternate title: Just use Netlify.
TL;DR: Deploy a Hugo site to GCP for free in less time than it will take you to read this article (Github Repo with all referenced commands)
EDIT: In October 2020 I updated the hosting of this site to use GCS + Cloudflare](https://devopsdirective.com/posts/2020/10/gcs-cloudflare-hosting/).
...