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
From the course: Deploying ASP.NET Core Applications
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
-
-
-
-
-
-
-
-
(Locked)
Docker overview2m 7s
-
(Locked)
Create a Docker image3m 31s
-
(Locked)
Test the Docker image locally1m 14s
-
(Locked)
Run and monitor a container1m 22s
-
(Locked)
Docker Compose overview50s
-
(Locked)
Kestrel and NGINX with Compose4m 6s
-
(Locked)
Save an image to a file1m 2s
-
(Locked)
Publish an image to Docker Hub1m 37s
-
(Locked)
-