~/talk

Best Practices for Production-ready .NET Docker Images

Talkat Docker Community All-Hands #7 · 2022-12-15..12-16· [dotnet, security]
slides:none on file

Creates a production-ready .NET Docker image for a small Web API, starting from an 808 MB SDK image then switching to Alpine (drops to ~670 MB) and finally using multi-stage build plus publish trimmed ready-to-run single-file to reach ~80 MB. Uses explicit base tags (avoid latest), caches by copying csproj first, adds a healthcheck (installs curl), switches to a non-root user, and runs Docker Scan — Docker scan showed 60 issues then 0 after updating one vulnerable library and rebuilding.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:53Initial Dockerfile approach
  3. 3:40Analyzing image issues
  4. 7:25Optimizing base images
  5. 11:36Multi-stage build strategy
  6. 18:49Build context optimization
  7. 22:47Health checks and security
  8. 25:42Configuration and environment
  9. 27:32Running as a non-root user
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.