Lightsail runs its own #!/bin/sh launch script and appends the instance's user data to it, so the user data runs under dash. The bash-only set -euo pipefail made it exit on its first line, before Docker was installed. The boot script is now plain set -eu (dash -n passes on the rendered script). apt-get waits up to 10 minutes for the lock that Ubuntu's first-boot updates may hold.
The existing instance can rerun its boot script under bash without being replaced, so no re-apply is needed for it.
🤖 Generated with Claude Code