4. Dockerfile - Mark-van-B/IT-Landscape-UCLL- GitHub Wiki

What is Dockerfile?

It is a simple text file, but without a file extension like ".txt" or "docx". Inside of Dockerfile will be a list of instructions to create a new Docker Image.

image

This example is from a simple webapp, which uses Node Package Manager (npm), a tool that allows us to use code that others graciously provided to easily develop our own apps.

Where is Dockerfile?

In the folder where the relevant software is that you want to bundle into an Image. You could place it elsewhere and fix the "WORKDIR" instruction to point to the right file directory, though.

image

As you can see, my example Dockerfile is in the "getting-started-app" folder, so the WORKDIR simply says /getting-started-app.