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.

  • How do use external_links to connect docker-compose to common service?
  • fail to access mysql via docker link
  • gunicorn fails to launch python-eve
  • Can I use docker to run MSBuild on OSX?
  • Is Docker for Mac Open Source? [closed]
  • pod routes don't match IP
  • 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)
    

  • New to docker, is it possible to protect my source code and add permissions?
  • Dynamically change dockerrun.aws.json image tag on deploy
  • Elastic search with docker does not start
  • DNS failover with Docker Swarm 1.12
  • Run docker with volume mapping from another docker container
  • How to make docker service start on my system reboot automatically?
  • 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.