From the course: Deploying ASP.NET Core Applications

Unlock the full course today

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

Create a Docker image

Create a Docker image

From the course: Deploying ASP.NET Core Applications

Start my 1-month free trial

Create a Docker image

- [Instructor] The first step to creating Docker images is installing Docker on your development machine. The official Docker website has instructions for Windows, Mac, and Linux. Since I'm on Windows 10, I installed the version for Windows. When you finish installing Docker and restart your machine, you can open up PowerShell and run Docker --version to make sure Docker is installed and running. The next thing that you need is a Docker file. The Docker file is like a recipe that tells Docker how to build an image for your application. You can create a Docker file from inside Visual Studio by right clicking on your project and choosing add, Docker support. You can also write this file by hand if you aren't using Visual Studio. I'll demonstrate creating this file with Notepad so you can understand what each command does. It's important that this file be saved in the root of the project, in the same directory as the csproj or program.cs files. If you're on Windows, use quotes to save…

Contents