LoginSignup
0
0

More than 5 years have passed since last update.

docker-compose build でE: Failed to fetch http://... Writing more data than expected (1123368 > 1086978)が発生する時の対応方法

Posted at

環境

OS:macOS Mojave 10.14.3
Docker:18.09.2, build 6247962
docker-compose:1.23.2, build 1110ad01
docker-machine:0.16.1, build cce350d7
php:7.1.23

事象

dockerを以下のコマンドでビルドをすると

docker-compose build --no-cache workspace

.
. 省略 
.

+ groupadd -g 1000 laradock
+ useradd -u 1000 -g laradock -m laradock -G docker_env
+ usermod -p * laradock -s /bin/bash
+ apt-get install -yqq apt-utils php7.1-zip nasm
E: Failed to fetch http://220.152.42.162:80/data/06abb81878b24fba/archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.11.08-1ubuntu0.1_amd64.deb  Writing more data than expected (1088616 > 1086978)

となりビルドがエラーで落ちるといった事象が発生しました。

対象となる方は少ないかと思いますが、もし同じ事象でお困りの方がいましたら、一旦私が行った処置をシェアしたいと思います。
お役に立てれは幸いです。

解決ではないが一旦これでエラー回避

以下のファイルの対象の部分をコメントアウトするだけです。

laradock/workspace/Dockerfile
# always run apt update when start and after add new source list, then clean up at end.
RUN set -xe; \
    apt-get update -yqq && \
    pecl channel-update pecl.php.net && \
    groupadd -g ${PGID} laradock && \
    useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
    usermod -p "*" laradock -s /bin/bash && \
    apt-get install -yqq \
      apt-utils && \
      #
      #--------------------------------------------------------------------------
      # Mandatory Software's Installation
      #--------------------------------------------------------------------------
      #
      # Mandatory Software's such as ("php-cli", "git", "vim", ....) are
      # installed on the base image 'laradock/workspace' image. If you want
      # to add more Software's or remove existing one, you need to edit the
      # base image (https://github.com/Laradock/workspace).
      #
      # next lines are here becase there is no auto build on dockerhub see https://github.com/laradock/laradock/pull/1903#issuecomment-463142846
      - libzip-dev zip unzip \
      + # libzip-dev zip unzip \ コメントアウトした
      # Install the zip extension
      - php${LARADOCK_PHP_VERSION}-zip \
      + # php${LARADOCK_PHP_VERSION}-zip \ コメントアウトした
      # nasm
      - nasm && \
      + # nasm && \ コメントアウトした
      php -m | grep -q 'zip'

結論

時間がなくなぜエラーが発生しているのかまだわかっていません。
私が必要とする環境では、必要のないモジュールでエラーが発生していたので一旦コメントアウトで対応しました。

もし解決方法をご存知の方がいらしたら是非教えていただけると嬉しいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0