์ƒ์„ธ ์ปจํ…์ธ 

๋ณธ๋ฌธ ์ œ๋ชฉ

[TIL] Docker ์ด๋ฏธ์ง€ ์‚ญ์ œํ•˜๊ธฐ

CLOUD/Docker

by ์—์Šคํ”„๋ฆฌํ„ฐ 2022. 11. 14. 16:11

๋ณธ๋ฌธ

728x90
๐Ÿ“
๐Ÿ’ก
Today I Learned ์š”์•ฝ (33ํšŒ์ฐจ) - docker image rm ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค

Docker ์ด๋ฏธ์ง€ ์‚ญ์ œํ•˜๊ธฐ

๋„์ปค์—์„œ ์ปจํ…Œ์ด๋„ˆ๋ฅผ run ํ–ˆ๋‹ค๊ฐ€ stop ํ–ˆ๋‹ค๊ฐ€ rm(์‚ญ์ œ) ํ•˜๋”๋ผ๋„ ๊ทธ ํ‹€์ด๋ผ ํ•  ์ˆ˜ ์žˆ๋Š” ์ด๋ฏธ์ง€ ํŒŒ์ผ์€ ๋‚จ๋Š”๋‹ค. ์ปจํ…Œ์ด๋„ˆ ์—ฌ๋Ÿฌ๊ฐœ๋ฅผ ์ƒ์„ฑํ–ˆ๋‹ค ์ง€์› ๋‹ค๋ฅผ ๋ฐ˜๋ณตํ•  ๊ฒฝ์šฐ ์ด๋ฏธ์ง€ ์šฉ๋Ÿ‰์ด ๊ณ„์†ํ•ด์„œ ์ฆ๊ฐ€ํ•˜๊ธฐ ๋•Œ๋ฌธ์— docker image rm ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์ด๋ฏธ์ง€๋ฅผ ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋ฏธ์ง€ ์‚ญ์ œ ์ „์— ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์กด์žฌํ•˜๋Š”์ง€ ํ™•์ธ ํ›„ ์‚ญ์ œํ•œ๋‹ค.

# ๊ธฐ์กด ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ํ™•์ธ
docker ps
# ๋„์ปค ์ด๋ฏธ์ง€ ํ™•์ธ
docker image ls
# ๋‹จ์ผ ์ด๋ฏธ์ง€ ์‚ญ์ œ
docker image rm {์ด๋ฏธ์ง€์ด๋ฆ„}
# ์—ฌ๋Ÿฌ ์ด๋ฏธ์ง€ ์‚ญ์ œ
docker image rm {์ด๋ฏธ์ง€์ด๋ฆ„} {์ด๋ฏธ์ง€์ด๋ฆ„} {์ด๋ฏธ์ง€์ด๋ฆ„}

ํƒœ๊ทธ

๊ด€๋ จ๊ธ€ ๋”๋ณด๊ธฐ

๋Œ“๊ธ€ ์˜์—ญ