From the course: Cloud Native Development with Node.js, Docker, and Kubernetes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add a Dockerfile

Add a Dockerfile

From the course: Cloud Native Development with Node.js, Docker, and Kubernetes

Start my 1-month free trial

Add a Dockerfile

- [Instructor] We've already run our application locally, but now we're going to package it as a docker image. This takes our application, which is running on our laptop, and packages it, so that it can run in a self-contained container. That container has everything that the application needs in order to be able to run. This includes an image of a Linux operating system. In this case Ubuntu 16 04. Along with Ubuntu System Libraries, a version of Node js. And then, a copy of our application. Once that's been assembled into a docker image, we can then take that and run it wherever we like. So that means it can be moved onto a server and we can run exactly the same application with exactly the same versions of the Linux Operating System, Node and our application regardless of how it's run. To do that, we need to add a docker file. The cloud native JS project provides docker file templates as part of its open source projects. If we scroll down to where it refers to docker we can see this…

Contents