I am trying to build an Ubuntu based image with distrobuilder and mysqld/php/apache2 on the image.
I grabbed the current Ubuntu image.yaml from the lxc-ci and stripped down for my needs, and built it with
distrobuilder build-lxd mysqld.yaml .
The error message I get when running with distrobuilder is that dpkg cannot shut down the running MySQL process and fails the package installation.
Setting up mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of stop. update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) Error: Unable to shut down server with process id 1723 dpkg: error processing package mysql-server-8.0 (--configure): installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
A little bit of googling brought me to this workaround for lxc, but as I am building for LXD this doesn’t work.
Is there anyway to enable the same when using distrobuilder to build the images?
Any other workaround necessary for this to happen?