Mariadb-10.0 install fails in boot2docker with “policy-rc.d denied execution” but works in Docker

I’m trying to setup a Vagrant + Docker based development environment on OS X 10.9. The first step is to create a container for MariaDB 10. However, for some reason, the Docker image won’t build in the boot2docker VM on my OS X machine even though it works perfectly fine on Ubuntu 14.04.

I’ve tried boot2docker 1.2 with Docker 1.2 and 1.3 with 1.3 as well as all Phusion images from 0.9.10 to 0.9.15 , ubuntu:latest and Vagrant 1.6 and 1.6.5 without luck. Version 5.5 of MariaDB installs fine both on OS X and Ubuntu but I need the newer version.

  • Image not pulled in systemd ExecStartPre=
  • SQL Server on Linux > Bulk Import error
  • Use Concourse's docker resource to fetch containers to be used in a docker compose
  • How to use Docker Remote API from a linux container to it's Windows host
  • docker web server does not shut even after deletion
  • Multiple background tcpdump processes inside docker
  • I’m out of ideas on this one. Why does it work in Docker but not boot2docker and is it possible to fix the issue?

    My Vagrantfile looks like this:

    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.define "db" do |db|
        db.vm.provider "docker" do |d|
 = "db"
          d.build_dir = "db"

    And the accompanying Dockerfile in the relative db dir:

    FROM phusion/baseimage:0.9.15
    ENV HOME /root
    CMD ["/sbin/my_init"]
    RUN apt-get install software-properties-common
    RUN apt-key adv --recv-keys --keyserver hkp:// 0xcbcb082a1bb943db
    RUN add-apt-repository 'deb trusty main'
    RUN apt-get update
    RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server
    RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

    vagrant up terminates with:

    Unpacking mariadb-server (10.0.14+maria-1~trusty) ...
    Processing triggers for ureadahead (0.100.0-16) ...
    Setting up libaio1:amd64 (0.3.109-4) ...
    Setting up libreadline5:amd64 (5.2+dfsg-2) ...
    Setting up libdbi-perl (1.630-1) ...
    Setting up libhtml-template-perl (2.95-1) ...
    Setting up libmysqlclient18 (10.0.14+maria-1~trusty) ...
    Setting up libdbd-mysql-perl (4.025-1) ...
    Setting up libmariadbclient18 (10.0.14+maria-1~trusty) ...
    Setting up mariadb-client-core-10.0 (10.0.14+maria-1~trusty) ...
    Setting up mariadb-client-10.0 (10.0.14+maria-1~trusty) ...
    Setting up mariadb-server-core-10.0 (10.0.14+maria-1~trusty) ...
    Setting up mariadb-server-10.0 (10.0.14+maria-1~trusty) ...
    invoke-rc.d: policy-rc.d denied execution of stop.
    dpkg: error processing package mariadb-server-10.0 (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of mariadb-server:
     mariadb-server depends on mariadb-server-10.0 (= 10.0.14+maria-1~trusty); however:
      Package mariadb-server-10.0 is not configured yet.
    dpkg: error processing package mariadb-server (--configure):
     dependency problems - leaving unconfigured
    Processing triggers for libc-bin (2.19-0ubuntu6.3) ...
    Processing triggers for ureadahead (0.100.0-16) ...
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Docker for Mac host network access
  • Inter-process communication between docker container and its host
  • Can Docker automatically add IP addresses to the host upon running container
  • akka cluster nodes behind NAT (using docker)
  • Rethinkdb container: rethinkdb process takes less RAM than the whole container
  • Ansible Docker Connection Error
  • One Solution collect form web for “Mariadb-10.0 install fails in boot2docker with “policy-rc.d denied execution” but works in Docker”

    I catch this error when my vagrant virtual mashine have very low RAM.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.