text
stringlengths
0
13.4k
ports:
- "80:80"
kestrel:
build: .
ports:
- "80"
Docker Compose is a tool that helps you create and run multi-container
applications. This configuration file defines two containers: nginx from
the ./nginx/Dockerfile recipe, and kestrel from the ./Dockerfile
recipe. The containers are explicitly linked together so they can
communicate.
123
Deploy with Docker
You can try spinning up the entire multi-container application by running:
docker-compose up
Try opening a browser and navigating to http://localhost (port 80, not
8080!). Nginx is listening on port 80 (the default HTTP port) and proxying
requests to your ASP.NET Core application hosted by Kestrel.
Set up a Docker server
Specific setup instructions are outside the scope of this book, but any
modern flavor of Linux (like Ubuntu) can be used to set up a Docker host.
For example, you could create a virtual machine with Amazon EC2, and
install the Docker service. You can search for "amazon ec2 set up
docker" (for example) for instructions.
I like using DigitalOcean because they've made it really easy to get
started. DigitalOcean has both a pre-built Docker virtual machine, and in-
depth tutorials for getting Docker up and running (search for
"digitalocean docker").
124
Conclusion
Conclusion
Thanks for making it to the end of the Little ASP.NET Core Book! If this
book was helpful (or not), I'd love to hear your thoughts. Send me your
comments via Twitter: https://twitter.com/nbarbettini
How to learn more
There's a lot more that ASP.NET Core can do that couldn't fit in this
short book, including
Building RESTful APIs and microservices
Using ASP.NET Core with single-page apps like Angular and React
Razor Pages
Bundling and minifying static assets
WebSockets and SignalR
There are a number of ways you can learn more:
The ASP.NET Core documentation. The official ASP.NET Core
documentation at http://docs.asp.net contains a number of in-depth
tutorials covering many of these topics. I'd highly recommend it!
ASP.NET Core in Action. This book by Andrew Lock is a
comprehensive, deep dive into ASP.NET Core. You can get it from
Amazon or a local bookstore.
Courses on LinkedIn Learning and Pluralsight. If you learn best from