我使用从(http://txt.fliglio.com/2013/11/creating-a-mysql-docker-container/)采取了以下dockerfile:相同dockerfiles给予不同的行为
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
ADD ./startup.sh /opt/startup.sh
EXPOSE 3305
CMD ["/bin/bash", "/opt/startup.sh"]
这工作没有任何错误,当我在泊坞版本0.8建立我的本地机器上。
我一直在尝试与信任的建立: https://index.docker.io/u/hardingnj/sqlcontainer/
然而泊坞窗的服务器我得到了第二次运行命令的错误上:
[91mln: failed to create symbolic link `/sbin/initctl': File exists
[0m
Error: build: The command [/bin/sh -c ln -s /bin/true /sbin/initctl] returned a non-zero code: 1
我的印象是,Dockerfiles应该相同方式工作独立于上下文?也许我所拉动的ubuntu版本不一样?
谢谢,这是一个好主意。我会尝试并更新。 – hardingnj