Upgrade to Pro — share decks privately, control downloads, hide ads and more …

昔の自分に伝えたい容量回復のためのDockerの仕組み / docker_tips

KSK
July 27, 2018

昔の自分に伝えたい容量回復のためのDockerの仕組み / docker_tips

KSK

July 27, 2018
Tweet

More Decks by KSK

Other Decks in Programming

Transcript

  1. image # Ұཡදࣔ
 $ docker images -a # ࢦఆͯ͠࡟আ $

    docker rmi [image] # ࢖ͬͯͳ͍΋ͷ·Δͬͱ࡟আʢv1.2.5 Ҏ߱ʣ $ docker image prune
  2. container # Ұཡදࣔ
 $ docker images -a # ࢦఆͯ͠ఀࢭɺ࡟আ $

    docker stop [container] $ docker rm [container] # ࢖ͬͯͳ͍΋ͷ·Δͬͱ࡟আʢv1.2.5 Ҏ߱ʣ $ docker container prune
  3. container # Ұཡදࣔ
 $ docker volume ls # ࢦఆͯ͠ఀࢭɺ࡟আ $

    docker volume rm [volume] # ࢖ͬͯͳ͍΋ͷ·Δͬͱ࡟আʢv1.2.5 Ҏ߱ʣ $ docker volume prune
  4. ͭ·Γ݁ہ ɾ·ͣ container Λఀࢭ&࡟আ ɾ͍࣍Ͱ image / volume Λ࡟আ ɹ-

    volume ͸ container ͷ࡟আ࣌ʹ -v Ͱ΋ ɾγεςϜͷ࿩Ͱݴ͑͹… ϓϩηεΛ kill ͔ͯ͠ΒϓϩάϥϜͷ ϑΝΠϧ΍DBΛ࡟আ͢Δɺͱ͍͏࿩
  5. ͪͳΈʹ ɾDocker for mac ࢖ͬͯΔͱ Docker.qcow2 ɹͱ͍͏ϑΝΠϧ͕ංେԽ͢Δ ɾ࡟আͳΓѹॖͳΓͪ͜Β΋ཁରԠ ɹ- v1.13

    Ҏ߱͸ఆظతʹѹॖ͞Ε͍ͯΔʢʁʣ # ஔ͍ͯ͋ΔσΟϨΫτϦ $ ll ~/Library/Containers/com.docker.docker/ Data/com.docker.driver.amd64-linux/ Docker.qcow2