From the course: Azure Kubernetes Service (AKS): Deploying Microservices

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Designing your Dockerfile frontend app

Designing your Dockerfile frontend app

- [Instructor] Now back in my Dockerfile I've deleted the content from the previous video. I'll paste the commands I've defined for this course and explain the content. Scrolling through the Dockerfile instructions you would notice that this is a multi-stage Dockerfile and we use multi-stage builds when we care much about the size of our container image. Each instruction in this Dockerfile adds additional layers which you would see when building an image, but at the end you might have such a large container image with size of hundreds of megabytes. Using a multi-stage approach would help us as we add an instruction to copy only the needed artifacts to the production image. From the top, we have from node 16 alpine as deps which stands for dependencies. Alpine is a lightweight Linux image with a size of approximately five megabytes, making it quite small. But this image with alpine tag means we want to build our application…

Contents