It behaves differently (the installation succeeds) if you install mysql- server from a bash prompt inside the container. Running the installation as a parameter to `systemd-nspawn` will fail. I have tested this on a 16.04.3 system and an 18.04 system.
I just noticed something especially weird: if I add `dpkg --configure -a` to the end of the `systemd-nspawn` command, then the `apt install` command will reliably finish. Prepare a base container to be used for the tests: 1. debootstrap bionic bionic 2. rm bionic/etc/resolv.conf This will always fail: sudo rm -rf testmysql && sudo cp -a bionic testmysql && sudo systemd-nspawn -D testmysql bash -c 'apt update && apt install mysql-server' This will always succeed: sudo rm -rf testmysql && sudo cp -a bionic testmysql && sudo systemd-nspawn -D testmysql bash -c 'apt update && apt install mysql-server; dpkg --configure -a' -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1752705 Title: When run from systemd-nspawn, installation of mysql-server fails because postinst fails to shut down server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1752705/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
