0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

dockerイメージファイルの置き場は溢れないか

Last updated at Posted at 2020-05-03

イメージファイルの置き場

Dockerのイメージファルの置き場はデフォルトでは/var/lib/docker以下にある.
いくつもイメージを落とし始めるとこの場所があふれるかもしれない.

置き場所を変更する

ubuntu 18.04.4LTSの場合.

例えば/opt/dockerに置きたい.
/optには心配しないでよいくらいの領域があるとする.

ここに方法があった
要するに,
/lib/systemd/system/docker.service
の一部を変更すればよい.

(before)
ExecStart=/usr/bin/docker daemon -H fd://

(after)
ExecStart=/usr/bin/docker daemon -g /opt/docker -H fd://

これでサービスを再起動すればよい.
システムの再起動でもよい.

voila (^-^)/

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?