既定では Docker のイメージやコンテナは /var/lib/docker に格納される でもそんなとこに何ギガも容量取られると困るー! と思ったのでイメージやコンテナの保管場所を移動方法をまとめました (そもそも /var/lib/docker に別ストレージをマウントしろよって話もありますが、別にそれでもいいです) 環境 手順 とりあえずdocker止める Unitファイルを編集 docker再起動 動作確認 注意点 参考URL 環境 Ubuntu 18.04 Docker 17.12.1-ce 手順 とりあえずdocker止める sudo su systemctl stop Docker Unitファイルを編集 /lib/systemd/system/docker.serviceを/etc/systemd/systemにコピペ cp /lib/systemd/system/doc