DevOps 2

Docker ๊ธฐ๋ณธ ๋ช…๋ น์–ด, ์‚ฌ์šฉ๋ฒ•

Docker ๊ธฐ๋ณธ ๋ช…๋ น์–ด Contaniner ์‹œ์ž‘ํ•˜๊ธฐ(Run) docker run -it -d ${IMAGE_ID}# -it: ํ„ฐ๋ฏธ๋„ ์ž…๋ ฅ์„ ์œ„ํ•œ ์˜ต์…˜; -d: detached mode docker run --name ${CONTAINER_NAME} -it -d ${IMAGE_ID}# --name: ์ปจํ…Œ์ด๋„ˆ ์ด๋ฆ„ ์„ค์ • ์˜ต์…˜ cocker ps# ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ ๋ชฉ๋ก ํ™•์ธ docker ps -a# ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ ๋ชฉ๋ก ํ™•์ธ Container ๋ช…๋ น์–ด ์‹คํ–‰ํ•˜๊ธฐ(Exec) # ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ์— ๋ช…๋ น ๋‚ด๋ฆฌ๊ธฐ docker exec -it [OPTIONS] ${CONTAINER_ID} ${COMMAND} [ARG...] docker exec -it ubuntu bash# ubuntu๋ผ๋Š” ์ด๋ฆ„์˜ ์ปจํ…Œ์ด๋„ˆ์— bash์‰˜๋กœ..

DevOps/Docker 2021.04.09

Docker(๋„์ปค)๋ž€? Docker ๊ธฐ๋ณธ ๊ฐœ๋…

๋ชฉ์ฐจ Docker๋ž€? VM(๊ฐ€์ƒ ๋จธ์‹ ) vs Docker Image(์ด๋ฏธ์ง€) Docker Architecture Docker๋ž€? ์ปจํ…Œ์ด๋„ˆ ๊ธฐ๋ฐ˜์˜ ์˜คํ”ˆ์†Œ์Šค ๊ฐ€์ƒํ™” ํ”Œ๋žซํผ ์‚ฌ๋žŒ๋“ค์ด ์ผ๋ฐ˜์ ์œผ๋กœ ์ƒ๊ฐํ•˜๋Š” ํ™”๋ฌผ ์ˆ˜์†ก์šฉ ๋ฐ•์Šค(์ปจํ…Œ์ด๋„ˆ)์˜ ๊ฐœ๋…์„ SW์— ์ ์šฉ ๋‹ค์–‘ํ•œ ํ”„๋กœ๊ทธ๋žจ, ์‹คํ–‰ํ™˜๊ฒฝ์„ ์ปจํ…Œ์ด๋„ˆ๋กœ ์ถ”์ƒํ™”ํ•˜์—ฌ ๋™์ผํ•œ ์ธํ„ฐํŽ˜์ด์Šค ์ œ๊ณต ํ”„๋กœ๊ทธ๋žจ์˜ ๋ฐฐํฌ ๋ฐ ๊ด€๋ฆฌ๋ฅผ ๋‹จ์ˆœํ™” VM(Virtual Machine) vs Docker VM Container Host OS ์œ„์— Guest OS ์ „์ฒด๋ฅผ ๊ฐ€์ƒํ™” ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ฒฉ๋ฆฌ ๋ฉ”๋ชจ๋ฆฌ ๊ณผ๋„ ์ ์œ (OS ์ฝ”๋“œ ๋•Œ๋ฌธ์—) ํ›จ์”ฌ ์ ์€ ๋ฉ”๋ชจ๋ฆฌ ์ ์œ  ๋‹ค์ˆ˜ VM ์‹คํ–‰ํ•˜๋ฉด ๊ธ‰๊ฒฉํ•œ ์„ฑ๋Šฅ ์ €ํ•˜ container engine์„ ์‚ฌ์šฉํ•˜์—ฌ ์„ฑ๋Šฅ ์ €ํ•˜ ์ ์Œ Scale up(์„ฑ๋Šฅ ํ–ฅ์ƒ) ์–ด๋ ค์›€ Scale up(์„ฑ๋Šฅ ํ–ฅ..

DevOps/Docker 2021.03.29