Refresh apt caches before building to prevent missing package errors
Ensure the container doesn't exit immediately if a tty isn't attached