Docker:错误创建aufs挂载到/ var / lib / docker / aufs / mnt / 15396ee0f38d161382f104e11c94b6ca0efafe10f9952e1dfba4f548009fbe59-init:无效参数

问题描述 投票:3回答:1

我正在尝试构建一个Docker vm并不断收到此错误:

创建aufs挂载到/ var / lib / docker / aufs / mnt / 15396ee0f38d161382f104e11c94b6ca0efafe10f9952e1dfba4f548009fbe59-init时出错:无效参数

我在Ubuntu 14上使用Docker版本1.11.2,构建b9f10c9。这是Dockerimage的代码:

FROM ubuntu:trusty
MAINTAINER Fernando Mayo <[email protected]>, Feng Honglin <[email protected]>
# Install packages
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
  apt-get -y install vim supervisor git curl unzip apache2 libapache2-mod-php5 pwgen php-apc php5-mcrypt php5-mysql php5-curl&& \
  echo "ServerName localhost" >> /etc/apache2/apache2.conf


# Install Composer
RUN curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
RUN composer global require "laravel/installer"
ENV PATH ~/.composer/vendor/bin:$PATH

# Add image configuration and scripts
ADD start-apache2.sh /start-apache2.sh
ADD start-mysqld.sh /start-mysqld.sh
ADD run.sh /run.sh
RUN chmod 755 /*.sh
ADD my.cnf /etc/mysql/conf.d/my.cnf
ADD supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
ADD supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf
ADD php.ini /etc/php5/cli/php.ini
ADD 000-default.conf /etc/apache2/sites-available/000-default.conf


# config to enable .htaccess
RUN a2enmod rewrite


# Copy over private key, and set permissions
ADD .ssh /root/.ssh


# Get aws stuff
RUN curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
RUN unzip awscli-bundle.zip
RUN ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws


#####This section has been moved into the run.sh to allow for cached builds that get the most up to date git repository. This is done by using ENTRYPOINT rather than RUN
# Clone the repo
RUN rm -rd /var/www/html
#RUN git clone ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/Server /var/www/html
# Set file permissions
#RUN chmod -R 777 /var/www/html/storage 
#RUN chmod -R 777 /var/www/html/bootstrap/cache
ENTRYPOINT /run.sh
###########################################################################################





# Environment variables to configure php
ENV PHP_UPLOAD_MAX_FILESIZE 10M
ENV PHP_POST_MAX_SIZE 10M




EXPOSE 80 3306
CMD ["/run.sh"]

我该如何解决这个安装问题?

编辑:可以在live usb上运行主机操作系统,特别是ubuntu,会导致这个问题吗?

我也尝试了Error: "error creating aufs mount to" when building dockerfile的建议,但它没有用。

linux ubuntu docker kernel mount
1个回答
1
投票

Live usb几乎肯定不是ext4,或其他支持的文件系统之一。很可能它正在进行叠加,我认为你不能在overlayfs上安装overlayfs。

您可以使用mount命令查找/ var / lib / docker的当前文件系统。例如。在我的本地环境中(我是符号链接的,因此我路径中的额外点和homelv中显示的文件):

# df /var/lib/docker/.
Filesystem                               1K-blocks      Used Available Use% Mounted on
/dev/mapper/bmitch--vg-homelv 720798904 437701948 246459468  64% /home

# mount | grep /dev/mapper/bmitch
/dev/mapper/bmitch--vg-homelv on /home type ext4 (rw,relatime,data=ordered)

请注意mount输出中的“type ext4”。

Docker有一个supported backing filesystems列表:

  • overlay2,overlay:xfs,ftype = 1,ext4
  • to:xfs,ext4
  • devicemapper:direct-lvm
  • btrfs:btrfs
  • zfs:zfs
  • vfs:任何文件系统
© www.soinside.com 2019 - 2024. All rights reserved.