{"id":545,"date":"2025-08-21T13:22:49","date_gmt":"2025-08-21T04:22:49","guid":{"rendered":"https:\/\/sejiwon.com\/?p=545"},"modified":"2025-08-21T13:22:49","modified_gmt":"2025-08-21T04:22:49","slug":"docker-%ea%b8%b0%eb%b3%b8-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%9a%94%ec%95%bd","status":"publish","type":"post","link":"https:\/\/sejiwon.com\/?p=545","title":{"rendered":"Docker \uae30\ubcf8 \uba85\ub839\uc5b4 \uc694\uc57d"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\ud83d\udccc \uae30\ubcf8 \uc124\uba85<\/h3>\n\n\n\n<ul>\n<li><code>docker<\/code>\ub294 Docker CLI\uc758 \uae30\ubcf8 \uba85\ub839\uc5b4\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li>Docker \uc2dc\uc2a4\ud15c \uc124\uc815\uc5d0 \ub530\ub77c <code>docker<\/code> \uba85\ub839\uc5b4 \uc55e\uc5d0 <code>sudo<\/code>\ub97c \ubd99\uc5ec\uc57c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>sudo<\/code> \uc5c6\uc774 \uc0ac\uc6a9\ud558\uace0 \uc2f6\ub2e4\uba74, <strong>\uc2dc\uc2a4\ud15c \uad00\ub9ac\uc790<\/strong>\uac00 <code>docker<\/code>\ub77c\ub294 Unix \uadf8\ub8f9\uc744 \ub9cc\ub4e4\uace0 \ud574\ub2f9 \uc720\uc800\ub97c \uadf8\ub8f9\uc5d0 \ucd94\uac00\ud558\uba74 \ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udd17 \uc6b4\uc601\uccb4\uc81c\ubcc4 Docker \uc124\uce58 \ubc0f sudo \uc124\uc815\uc740 \uacf5\uc2dd \uc124\uce58 \ubb38\uc11c\ub97c \ucc38\uace0\ud558\uc138\uc694.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udd98 \ub3c4\uc6c0\ub9d0 \ubcf4\uae30<\/h3>\n\n\n\n<ul>\n<li>\uba85\ub839\uc5b4 \ub4a4\uc5d0 <code>--help<\/code> \uc635\uc158\uc744 \ubd99\uc774\uba74 \ud574\ub2f9 \uba85\ub839\uc758 \ub3c4\uc6c0\ub9d0\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run --help\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udce6 <code>docker run<\/code> \uc0ac\uc6a9\ubc95<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run &#91;OPTIONS] IMAGE &#91;COMMAND] &#91;ARG...]\n<\/code><\/pre>\n\n\n\n<ul>\n<li>\uc774\ubbf8\uc9c0\ub85c\ubd80\ud130 \ucee8\ud14c\uc774\ub108\ub97c \uc0dd\uc131\ud558\uace0 \uc2e4\ud589\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f \uc8fc\uc694 \uc635\uc158 \uc608\uc2dc<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\uc635\uc158<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>--add-host<\/code><\/td><td>\ud638\uc2a4\ud2b8-IP \ub9e4\ud551 \ucd94\uac00<\/td><\/tr><tr><td><code>-a, --attach<\/code><\/td><td>\ud45c\uc900 \uc785\ucd9c\ub825\uc5d0 \uc5f0\uacb0 (stdin, stdout, stderr)<\/td><\/tr><tr><td><code>-it<\/code><\/td><td>\uc0c1\ud638\uc791\uc6a9 \ubaa8\ub4dc + \ud130\ubbf8\ub110 \ud560\ub2f9<\/td><\/tr><tr><td><code>-d<\/code><\/td><td>\ubc31\uadf8\ub77c\uc6b4\ub4dc \uc2e4\ud589 (detached mode)<\/td><\/tr><tr><td><code>--name<\/code><\/td><td>\ucee8\ud14c\uc774\ub108 \uc774\ub984 \uc9c0\uc815<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\uc608\uc2dc:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -it --name my_container ubuntu \/bin\/bash\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf0d \ud658\uacbd \ubcc0\uc218<\/h2>\n\n\n\n<p>Docker CLI\ub294 \ub2e4\uc591\ud55c \ud658\uacbd \ubcc0\uc218\ub97c \uc9c0\uc6d0\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\ubcc0\uc218<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>DOCKER_HOST<\/code><\/td><td>\uc5f0\uacb0\ud560 Docker \ub370\ubaac \uc18c\ucf13 \uc8fc\uc18c<\/td><\/tr><tr><td><code>DOCKER_TLS_VERIFY<\/code><\/td><td>TLS \uc778\uc99d \uc0ac\uc6a9 \uc5ec\ubd80<\/td><\/tr><tr><td><code>DOCKER_CONFIG<\/code><\/td><td>\uc124\uc815 \ud30c\uc77c \uc704\uce58 \ubcc0\uacbd<\/td><\/tr><tr><td><code>HTTP_PROXY<\/code> \/ <code>HTTPS_PROXY<\/code><\/td><td>\ud504\ub85d\uc2dc \uc124\uc815<\/td><\/tr><tr><td><code>NO_PROXY<\/code><\/td><td>\ud504\ub85d\uc2dc \uc81c\uc678 \ub300\uc0c1<\/td><\/tr><tr><td><code>DOCKER_CONTEXT<\/code><\/td><td>\uc0ac\uc6a9\ud560 Docker \ucee8\ud14d\uc2a4\ud2b8<\/td><\/tr><tr><td><code>DOCKER_CONTENT_TRUST<\/code><\/td><td>\uc774\ubbf8\uc9c0 \uc11c\uba85 \uc0ac\uc6a9 \uc5ec\ubd80<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd27 \uad6c\uc131 \ud30c\uc77c (config.json)<\/h2>\n\n\n\n<ul>\n<li>\uae30\ubcf8 \uc704\uce58: <code>~\/.docker\/config.json<\/code><\/li>\n\n\n\n<li><code>docker<\/code> \uba85\ub839\uc5b4\uc758 \uc77c\ubd80 \ub3d9\uc791\uc744 \uc774 \ud30c\uc77c\ub85c \uc124\uc815\ud560 \uc218 \uc788\uc74c<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\uc124\uc815 \uc608\uc2dc<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"psFormat\": \"table {{.ID}}\\t{{.Image}}\\t{{.Command}}\",\n  \"detachKeys\": \"ctrl-e,e\",\n  \"credsStore\": \"secretservice\",\n  \"proxies\": {\n    \"default\": {\n      \"httpProxy\": \"http:\/\/proxy.example.com:3128\",\n      \"httpsProxy\": \"https:\/\/proxy.example.com:3129\"\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd12 \uc778\uc99d \ubc0f \ud06c\ub808\ub374\uc15c \uc800\uc7a5<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\uc635\uc158<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>credsStore<\/code><\/td><td>\ubaa8\ub4e0 \uc778\uc99d\uc815\ubcf4\ub97c \uc800\uc7a5\ud560 \uae30\ubcf8 \uc678\ubd80 \ud504\ub85c\uadf8\ub7a8 \uc9c0\uc815<\/td><\/tr><tr><td><code>credHelpers<\/code><\/td><td>\ud2b9\uc815 \ub808\uc9c0\uc2a4\ud2b8\ub9ac\uc5d0 \ub300\ud574 \uc0ac\uc6a9\ud560 \ud06c\ub808\ub374\uc15c \ud5ec\ud37c \uc9c0\uc815<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd0c Docker \uba85\ub839\uc5b4 \uc885\ub958 (\uc11c\ube0c\ucee4\ub9e8\ub4dc)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\uba85\ub839\uc5b4<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>docker build<\/code><\/td><td>Dockerfile\ub85c \uc774\ubbf8\uc9c0 \ube4c\ub4dc<\/td><\/tr><tr><td><code>docker run<\/code><\/td><td>\ucee8\ud14c\uc774\ub108 \uc2e4\ud589<\/td><\/tr><tr><td><code>docker ps<\/code><\/td><td>\uc2e4\ud589 \uc911\uc778 \ucee8\ud14c\uc774\ub108 \ubaa9\ub85d<\/td><\/tr><tr><td><code>docker stop<\/code><\/td><td>\ucee8\ud14c\uc774\ub108 \uc815\uc9c0<\/td><\/tr><tr><td><code>docker rm<\/code><\/td><td>\ucee8\ud14c\uc774\ub108 \uc0ad\uc81c<\/td><\/tr><tr><td><code>docker image<\/code><\/td><td>\uc774\ubbf8\uc9c0 \uad00\ub828 \uba85\ub839\uc5b4<\/td><\/tr><tr><td><code>docker volume<\/code><\/td><td>\ubcfc\ub968 \uad00\ub9ac<\/td><\/tr><tr><td><code>docker network<\/code><\/td><td>\ub124\ud2b8\uc6cc\ud06c \uad00\ub9ac<\/td><\/tr><tr><td><code>docker compose<\/code><\/td><td>Docker Compose \uc0ac\uc6a9<\/td><\/tr><tr><td><code>docker system<\/code><\/td><td>\uc2dc\uc2a4\ud15c \ub9ac\uc18c\uc2a4 \uad00\ub9ac<\/td><\/tr><tr><td><code>docker context<\/code><\/td><td>\ucee8\ud14d\uc2a4\ud2b8 \uc804\ud658 \ubc0f \uc124\uc815<\/td><\/tr><tr><td><code>docker login\/logout<\/code><\/td><td>\ub808\uc9c0\uc2a4\ud2b8\ub9ac \ub85c\uadf8\uc778\/\ub85c\uadf8\uc544\uc6c3<\/td><\/tr><tr><td><code>docker inspect<\/code><\/td><td>\ucee8\ud14c\uc774\ub108\/\uc774\ubbf8\uc9c0 \uc0c1\uc138 \uc815\ubcf4 \ucd9c\ub825<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udce1 \ub370\ubaac \uc18c\ucf13 \uc5f0\uacb0 (<code>-H<\/code> \uc635\uc158)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\uc2a4\ud0b4<\/th><th>\uc124\uba85<\/th><th>\uc608\uc2dc<\/th><\/tr><\/thead><tbody><tr><td><code>unix:\/\/<\/code><\/td><td>Unix \uc18c\ucf13<\/td><td><code>unix:\/\/\/var\/run\/docker.sock<\/code><\/td><\/tr><tr><td><code>tcp:\/\/<\/code><\/td><td>TCP \uc5f0\uacb0<\/td><td><code>tcp:\/\/192.168.0.10:2376<\/code><\/td><\/tr><tr><td><code>ssh:\/\/<\/code><\/td><td>SSH \uc5f0\uacb0<\/td><td><code>ssh:\/\/user@host<\/code><\/td><\/tr><tr><td><code>npipe:\/\/<\/code><\/td><td>Windows \ud30c\uc774\ud504<\/td><td><code>npipe:\/\/\/\/.\/pipe\/docker_engine<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\uc608:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker -H ssh:\/\/user@192.168.64.5 ps\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddea \uc2e4\ud5d8\uc801 \uae30\ub2a5<\/h2>\n\n\n\n<ul>\n<li>Docker 20.10\ubd80\ud130 \uc77c\ubd80 \uc2e4\ud5d8\uc801 \uae30\ub2a5\uc774 \uae30\ubcf8 \ud65c\uc131\ud654\ub428<\/li>\n\n\n\n<li>\uc77c\ubd80 \ud658\uacbd\ubcc0\uc218\ub098 \uad6c\uc131 \ud56d\ubaa9\uc740 &#8220;\uc2e4\ud5d8\uc801&#8221;\uc774\uba70 \ud5a5\ud6c4 \ubcc0\uacbd \uac00\ub2a5\uc131 \uc788\uc74c<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u26a0\ufe0f \ubcf4\uc548 \uc8fc\uc758\uc0ac\ud56d<\/h2>\n\n\n\n<ul>\n<li><code>~\/.docker\/config.json<\/code> \ud30c\uc77c\uc5d0\ub294 \uc778\uc99d \uc815\ubcf4\ub098 \ud504\ub85d\uc2dc \uc815\ubcf4\uac00 \ud3ec\ud568\ub420 \uc218 \uc788\uc74c<\/li>\n\n\n\n<li><strong>\uc808\ub300\ub85c Git \ub4f1\uc5d0 \uc5c5\ub85c\ub4dc\ud558\uac70\ub098 \uacf5\uc720 \uae08\uc9c0<\/strong><\/li>\n\n\n\n<li>\ubbfc\uac10\ud55c \uc815\ubcf4\uac00 \ud3ec\ud568\ub41c \ud658\uacbd\ubcc0\uc218\ub294 <strong>\ud3c9\ubb38\uc73c\ub85c \uc800\uc7a5<\/strong>\ub418\ubbc0\ub85c \uc8fc\uc758<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \uc608\uc2dc \uc815\ub9ac<\/h2>\n\n\n\n<p>\ucee8\ud14c\uc774\ub108\ub97c \uc0c1\ud638\uc791\uc6a9 \ubaa8\ub4dc\ub85c \uc2e4\ud589:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -it ubuntu \/bin\/bash\n<\/code><\/pre>\n\n\n\n<p>\ucee8\ud14c\uc774\ub108 \ubc31\uadf8\ub77c\uc6b4\ub4dc \uc2e4\ud589:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d --name web nginx\n<\/code><\/pre>\n\n\n\n<p>\ud2b9\uc815 \uc774\ubbf8\uc9c0 \ubaa9\ub85d \ubcf4\uae30:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker images\n<\/code><\/pre>\n\n\n\n<p>\ucee8\ud14c\uc774\ub108 \uba48\ucd94\uae30:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker stop &lt;container_id&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udccc \uae30\ubcf8 \uc124\uba85 \ud83d\udd17 \uc6b4\uc601\uccb4\uc81c\ubcc4 Docker \uc124\uce58 \ubc0f sudo \uc124\uc815\uc740 \uacf5\uc2dd \uc124\uce58 \ubb38\uc11c\ub97c \ucc38\uace0\ud558\uc138\uc694. \ud83c\udd98 \ub3c4\uc6c0\ub9d0 \ubcf4\uae30 \ud83d\udce6 docker run \uc0ac\uc6a9\ubc95 \u2699\ufe0f \uc8fc\uc694 \uc635\uc158 \uc608\uc2dc \uc635\uc158 \uc124\uba85 &#8211;add-host \ud638\uc2a4\ud2b8-IP \ub9e4\ud551 \ucd94\uac00 -a, &#8211;attach \ud45c\uc900 \uc785\ucd9c\ub825\uc5d0 \uc5f0\uacb0 (stdin, stdout, stderr) -it \uc0c1\ud638\uc791\uc6a9 \ubaa8\ub4dc + \ud130\ubbf8\ub110 \ud560\ub2f9 -d \ubc31\uadf8\ub77c\uc6b4\ub4dc \uc2e4\ud589 (detached mode) &#8211;name \ucee8\ud14c\uc774\ub108 \uc774\ub984 \uc9c0\uc815 \uc608\uc2dc:\u2026 <span class=\"read-more\"><a href=\"https:\/\/sejiwon.com\/?p=545\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/545"}],"collection":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=545"}],"version-history":[{"count":1,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/545\/revisions"}],"predecessor-version":[{"id":546,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/545\/revisions\/546"}],"wp:attachment":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}