I got the "socket hang up" error after upgrading to .NET 8 and changing the Docker image. The problem was an incorrect port mapping in my `docker-compose.yml`. I had `ports: 8005:80`, which worked before the upgrade. However, the new .NET 8 images default to port 8080. Changing my `docker-compose.yml` to `ports: 8005:8080` fixed the issue.
**Key takeaway:** Ensure your `docker-compose.yml` port mapping matches the port your app listens on inside the container.