Create a docker file
Create a docker file
In the dotnet-docker
directory, create a file named Dockerfile
Create a docker ignore file
To make your build context as small as possible, add a .dockerignore
file to your dotnet-docker
folder and copy the following into it.
Directory structure
Just to recap, we created a directory in our local machine called dotnet-docker
and created a simple .NET application in the src
folder. We also created a Dockerfile containing the commands to build an image as well as a .dockerignore file. The dotnet-docker
directory structure should now look like:
Last updated