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.
Kestrel and NGINX with Compose
From the course: Deploying ASP.NET Core Applications
Kestrel and NGINX with Compose
- [Instructor] First we need to create a Docker file for the new Nginx container we need. To keep things organized, I'll create a folder here in my project folder called nginx. I'll use Notepad to create the new Docker file and save it in the nginx folder as Dockerfile with no extension. There's already a public base image for Nginx, so we can use FROM nginx to get started really quickly. The only thing we need to do is customize the Nginx configuration, so we'll copy our own nginx.conf file into the image. We need to copy it to /etc/nginx/nginx.conf. And that takes care of the docker file. Now we need to create nginx.conf. Save this also in the nginx folder as nginx.conf with quotes to preserve the extension. This Nginx configuration will be very similar to the configuration we used earlier when we configured Nginx on a Linux machine. This time it includes a few more elements. We need an events group that specifies the maximum number of concurrent worker connections. This means that…
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)
-