LoginSignup
6
4

More than 5 years have passed since last update.

docker build中にディスク容量ないぞ!って怒られる場合の対処法

Last updated at Posted at 2015-11-26

Macでboot2dockerからdocker-machineに乗り換え後の話。

docker build中、一発目のapt installで死ぬ。
You don't have enough free space とか no space left on device とか言われる。

下記はapt中に怒られた時のログ。

(前略)
  libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-render0
  libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util0 libxcb-xfixes0
  libxcb-xkb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6
  libxext6 libxfixes3 libxfont1 libxi6 libxinerama1 libxkbcommon-x11-0
  libxkbcommon0 libxkbfile1 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2
  libxrender1 libxshmfence1 libxslt1.1 libxt6 libxxf86vm1 perl perl-modules
  qttranslations5-l10n rename sgml-base shared-mime-info ucf wkhtmltopdf
  x11-common x11-xkb-utils xauth xdg-user-dirs xfonts-base xfonts-encodings
  xfonts-utils xkb-data xml-core xnest xserver-common
0 upgraded, 187 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.8 MB of archives.
After this operation, 348 MB of additional disk space will be used.
E: You don't have enough free space in /var/cache/apt/archives/.
The command '/bin/sh -c apt-get -y install wkhtmltopdf' returned a non-zero code: 100

原因は簡単。docker-machineで作ったVMの容量が足りない。
まだ一つ目のコンテナを作り始めた程度だったので、VMごと作り直しで対処。

$ docker-machine rm local
$ docker-machine create --virtualbox-disk-size 10000 --driver virtualbox local
6
4
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
6
4