Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vagrant Mariadb-10.0安装在boot2docker中失败,带有“0”;政策rc.d拒绝执行“;但是在Docker工作_Vagrant_Docker_Boot2docker - Fatal编程技术网

Vagrant Mariadb-10.0安装在boot2docker中失败,带有“0”;政策rc.d拒绝执行“;但是在Docker工作

Vagrant Mariadb-10.0安装在boot2docker中失败,带有“0”;政策rc.d拒绝执行“;但是在Docker工作,vagrant,docker,boot2docker,Vagrant,Docker,Boot2docker,我正试图在OSX10.9上建立一个基于Vagrant+Docker的开发环境。第一步是为MariaDB 10创建一个容器。然而,由于某些原因,Docker映像不会在我的OS X机器上的boot2docker VM中构建,即使它在Ubuntu 14.04上运行得非常好 我试过boot2docker 1.2和Docker 1.2,1.3和1.3,以及从0.9.10到0.9.15的所有Phusion图像,ubuntu:Lasts和Vagrant 1.6和1.6.5,但都没有成功。MariaDB的5.5

我正试图在OSX10.9上建立一个基于Vagrant+Docker的开发环境。第一步是为MariaDB 10创建一个容器。然而,由于某些原因,Docker映像不会在我的OS X机器上的boot2docker VM中构建,即使它在Ubuntu 14.04上运行得非常好

我试过boot2docker 1.2和Docker 1.2,1.3和1.3,以及从0.9.10到0.9.15的所有Phusion图像,ubuntu:Lasts和Vagrant 1.6和1.6.5,但都没有成功。MariaDB的5.5版在OSX和Ubuntu上都安装得很好,但我需要更新的版本

这件事我没主意了。为什么它在Docker中工作,但在boot2docker中不工作?是否有可能修复该问题

我的
Vagrantfile
如下所示:

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
以及相对
db
dir中附带的
Dockerfile

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
终止于:

...
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)

当我流浪的虚拟mashine内存非常低时,我发现了这个错误。

我也遇到了这个问题。