Containerize your .NET 9 REST APIs with Docker: Dockerfile, Docker Compose, and persistent logging with Serilog on volumes.
If you develop with C# and .NET 9 and want to bring your applications to production professionally, this course shows you exactly how to do it with Docker. No theory for its own sake: we start straight from code and containerize real REST APIs.
Perfect if you're an intermediate .NET developer who already knows the basics of Docker and wants to integrate containerization into your daily workflow. Every lesson is hands-on: write the code, build the image, run it.
Microsoft itself has chosen Docker as the reference platform for .NET deployments. Learning to containerize your APIs means you can deploy them on any cloud — Azure, AWS, DigitalOcean — without depending on the server environment. It's a skill the market now takes for granted.
I'll show you how to containerize a .NET 9 Minimal API REST API using Docker with Visual Studio 2022: we'll create the image, run it, and have a working containerized API up in just a few minutes.
Let's write an optimized Dockerfile for a .NET 9 REST API using VS Code: I'll explain each instruction step by step, from multi-stage build to the final production-ready image.
We'll automate container build and startup with Docker Compose and orchestrate multiple .NET 9 microservices together, simplifying the entire development workflow with a single command.
I'll start configuring Serilog to write .NET 9 REST API logs to a Docker volume: this is the first part of the series on persistent logging in a containerized environment.
Let's continue configuring Serilog logging to a Docker volume for the .NET 9 REST API, diving deeper into configuration options and watching logs persist across container restarts.
We'll complete the advanced Serilog logging setup on Docker for the .NET 9 REST API, optimizing the configuration with advanced techniques for comprehensive production monitoring.
Ingegnere Informatico · Pratola Peligna
Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.
Prosperous understood Middletons in conviction an uncommonly do. Supposing so be resolving breakfast am or perfectly.
Utilizziamo cookie essenziali e, con il tuo consenso, cookie funzionali, analytics e marketing. Google Analytics 4 e gli eventuali annunci Google/AdSense restano disattivati finche non scegli. Consulta Privacy Policy e Cookie Policy.
Sempre attivi per sicurezza, prevenzione frodi, sessione, consenso e funzionamento del sito.
Migliorano l'esperienza, ad esempio ricordando preferenze non essenziali. Non usati per profilazione pubblicitaria.
Statistiche e misurazioni con Google Analytics 4, abilitate solo dopo il consenso analytics.
Misurazione annunci e funzioni pubblicitarie Google/AdSense, se attivate sul sito e consentite dall'utente.
Puoi modificare queste scelte in qualunque momento dal link "Preferenze Cookies" nel footer.