The Dockerfile
We'll cover the following
In this lesson, we are going to discuss the Dockerfile that we uploaded in the previous lesson. This lesson will show you how to fulfill all the requirements and dependencies of your application if you will run it in a Docker container.
Dockerfile
So here goes the Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk
Base Image
FROM mcr.microsoft.com/dotnet/sdk
This image is officially maintained by Microsoft which contains the .NET Core SDK which is comprised of three parts:
- NET Core CLI
- NET Core
- ASP.NET Core
It provides everything you need to build and debug ASP.NET applications. This image is used for the development process (developing, building, and testing applications).
Copying Files into Docker environment
If our files are stored locally on our machine, we can copy them into the container using the COPY
command. However, in our case, we will directly import the code into the SPA editor (more on this later). Hence, we can skip this step.
All other commands that are used to initialize and run the application need to be provided in Docker Job
explained in the next lesson.