fatal error installing virtualmin inside a docker ubuntu 16.04 container.

docker@default:~$ docker --version
Docker version 17.03.1-ce, build c6d412e

im trying to run /bin/sh install.sh to install virtualmin to a docker container that was started with the following docker run command. The install runs for about 10 minutes and then crashes out with fatal error. Steps reproduced below. Ill send any info you need for further diagnostics.

I really hope theres solution because it would be great to run a cluster of virtualmin servers side-by-side as docker containers.

docker@dockerhost:/ docker run -it --name ubuntu2 -v /c/Web/Drupal:/c/Web/Drupal -h=unbuntu2.docker.net ubuntu /bin/bash

once inside the container…

root@unbuntu1:/# hostname
unbuntu1.docker.net

root@unbuntu1:/# ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:02
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:103281 errors:0 dropped:0 overruns:0 frame:0
TX packets:96829 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218137017 (218.1 MB) TX bytes:5296051 (5.2 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@unbuntu1:/# /bin/sh install.sh

Configuration file ‘/etc/ssh/ssh_import_id’, does not exist on system.
Installing new config file as you requested.
Setting up libwww-perl (6.15-1) …
Setting up libxml-parser-perl (2.44-1build1) …
Setting up libxml-sax-expat-perl (0.40-2) …
update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::Expat with priority 50…
update-perl-sax-parsers: Updating overall Perl SAX parser modules info file…
Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version
Setting up ruby (1:2.3.0+1) …
Setting up spamassassin (3.4.1-3) …

Configuration file ‘/etc/cron.daily/spamassassin’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/default/spamassassin’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/init.d/spamassassin’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/65_debian.cf’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/init.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/local.cf’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v310.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v312.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v320.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v330.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v340.pre’, does not exist on system.
Installing new config file as you requested.

Configuration file ‘/etc/spamassassin/v341.pre’, does not exist on system.
Installing new config file as you requested.
Adding system user debian-spamd' (UID 116) ... Adding new group debian-spamd’ (GID 120) …
Adding new user debian-spamd' (UID 116) with group debian-spamd’ …
Creating home directory `/var/lib/spamassassin’ …
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up sa-compile (3.4.1-3) …

Configuration file ‘/etc/spamassassin/sa-compile.pre’, does not exist on system.
Installing new config file as you requested.
Running sa-compile (may take a long time)
Processing triggers for systemd (229-4ubuntu16) …
Processing triggers for libc-bin (2.23-0ubuntu7) …
Processing triggers for initramfs-tools (0.122ubuntu8.8) …
Processing triggers for sgml-base (1.26+nmu4ubuntu1) …
Processing triggers for dovecot-core (1:2.2.22-1ubuntu2.2) …
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of restart.
Processing triggers for libapache2-mod-php7.0 (7.0.15-0ubuntu0.16.04.4) …
Errors were encountered while processing:
apt-show-versions
usermin
webmin
FATAL - 2017-04-03 15:33:14 - Fatal Error Occurred: Something went wrong during installation: 0
FATAL - 2017-04-03 15:33:14 - Cannot continue installation.
FATAL - 2017-04-03 15:33:14 - Attempting to remove virtualmin repository configuration, so the installation can be
FATAL - 2017-04-03 15:33:14 - re-attempted after any problems have been resolved.
FATAL - 2017-04-03 15:33:14 - Removing temporary directory and files.
FATAL - 2017-04-03 15:33:14 - If you are unsure of what went wrong, you may wish to review the log
FATAL - 2017-04-03 15:33:14 - in /root/virtualmin-install.log

im giving this a try but id prefer to install.sh onto a clean os.

https://hub.docker.com/r/opencsi/virtualmin/