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.

  • docker running splash container but localhost does not load (windows 10)
  • Unable to start Docker in Windows 10 - Hyper-V error is thrown
  • Docker Beta on OS X: configure where images and logs are saved
  • how to configure docker to limit the range of ports for spinning up containers
  • How do I restart Docker for Mac from the terminal?
  • Deploy Docker container using Kubernetes
  • 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:

    VAGRANTFILE_API_VERSION = "2"
    ENV["VAGRANT_DEFAULT_PROVIDER"] = "docker"
    
    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.define "db" do |db|
        db.vm.provider "docker" do |d|
          d.name = "db"
          d.build_dir = "db"
        end
      end
    end
    

    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://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
    RUN add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/ubuntu 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:
     mariadb-server-10.0
     mariadb-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

  • How to remove docker aufs folder?
  • How to route to host in docker container during 'docker build'
  • Assigning docker container to a recieved from outside port with Python
  • App must be inserted into the docker image?
  • bash regular expressions to get docker container port number
  • How can I somewhat securely run distccd on a docker image in the cloud?
  • 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.