由于文件夹中有大量数据,docker-compose 构建停止

由于文件夹中有大量数据,docker-compose 构建停止

我在一台 Vagrant 机器上运行 Docker,该机器有一个包含一些数据的共享文件夹。此外,我正在使用 docker-compose 来构建镜像。在 docker 文件所在的根文件夹中,存在一些包含(大量)数据的文件夹。当这些文件夹存在时,构建过程会失败。当我暂时删除该文件夹时,构建过程会成功。为什么 docker-compose 会进入这些文件夹?我可以阻止这种情况吗?

这是 docker-compose.yml 部分:

 frontend:
    restart: on-failure
    build:
      context: ./
      dockerfile: php-lumen.dockerfile
    container_name: frontend
    ports:
      - "1010:80"
    links:
      - mongo
      - mysql
    volumes:
      - /data/data/frontend:/app

这是错误:

 vagrant@dev:/data/results/orthology/tmp$ sudo docker-compose up --build frontend
 Creating network "data_default" with the default driver
 Building frontend
 Traceback (most recent call last):
   File "site-packages/docker/utils/build.py", line 97, in create_archive
   File "tarfile.py", line 1980, in addfile
   File "tarfile.py", line 252, in copyfileobj
   File "tempfile.py", line 485, in func_wrapper
 OSError: [Errno 28] No space left on device

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "bin/docker-compose", line 6, in <module>
   File "compose/cli/main.py", line 71, in main
   File "compose/cli/main.py", line 127, in perform_command
   File "compose/cli/main.py", line 1080, in up
   File "compose/cli/main.py", line 1076, in up
   File "compose/project.py", line 475, in up
   File "compose/service.py", line 342, in ensure_image_exists
   File "compose/service.py", line 1082, in build
   File "site-packages/docker/api/build.py", line 154, in build
   File "site-packages/docker/utils/build.py", line 31, in tar
   File "site-packages/docker/utils/build.py", line 100, in create_archive
 OSError: Can not read file in context: /data/data/large_data_file.tab
 [26820] Failed to execute script docker-compose

任何人?

相关内容