{"id":95,"date":"2021-03-15T08:09:21","date_gmt":"2021-03-14T23:09:21","guid":{"rendered":"https:\/\/auto.meto4d.pgw.jp\/blog\/?p=95"},"modified":"2021-12-21T21:08:34","modified_gmt":"2021-12-21T12:08:34","slug":"docker%e7%92%b0%e5%a2%83%e3%82%92%e4%bd%9c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/auto.meto4d.pgw.jp\/blog\/?p=95","title":{"rendered":"Docker\u74b0\u5883\u3092\u4f5c\u308b"},"content":{"rendered":"\n<p>\u5965\u3055\u3093\u3001\u3054\u5b58\u77e5\u3067\u3057\u305f\uff1f\u4eca\u306e\u6d41\u884c\u308a\u306f\u30b3\u30f3\u30c6\u30ca\u3089\u3057\u3044\u3093\u3067\u3059\u3063\u3066\u3088\uff01<br>\u96a3\u306e\u5965\u3055\u3093\u3082\u3084\u3063\u3066\u307e\u3059\u308f\u3088\uff01<\/p>\n\n\n\n<p>\u30b3\u30f3\u30c6\u30ca\u304c\u306a\u3093\u306a\u306e\u304b\u77e5\u3063\u3066\u3044\u308b\u3002 \u5b9f\u306fk8s\u3082\u4f7f\u3048\u308b\u3002\u306a\u3093\u306a\u3089k8s\u306e\u304a\u304b\u3052\u3067\u3054\u98ef\u3092\u98df\u3079\u3066\u308b\u307e\u3067\u3042\u308b\u3002<br>\u3067\u3082Docker\u74b0\u5883\u304c\u306a\u3044\u304b\u3089\u3001\u3069\u3046\u3082\u6163\u308c\u306a\u3044\u3002<br>\u81ea\u5b85\u74b0\u5883\u306bDocker\u5c0e\u5165\u306f\u9762\u5012\u304f\u3055\u3044\u3057\u5fc5\u8981\u306a\u304b\u3063\u305f\u3057\u2026<br>\u91cd\u3044\u8170\u3092\u4e0a\u3052\u3066\u3001Windows\u3068ArchLinux\u306bDocker\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066\u3044\u3053\u3046\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306e\u76ee\u6a19\u306fWin10\u74b0\u5883\u306bDocker\u3067Nginx\u74b0\u5883\u3092\u4f5c\u308b\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2>\u307e\u305a\u306f\u30e1\u30a4\u30f3PC\u306bDocker\u74b0\u5883\u3092\u5165\u308c\u308b<\/h2>\n\n\n\n<p>\u30e1\u30a4\u30f3PC\u306fWindows10 64bit Education<br>Windows\u74b0\u5883\u306bDocker\u5c0e\u5165\u306f\u307e\u3058\u3067\u3088\u304f\u77e5\u3089\u306a\u3044<br>\u3053\u3053\u3089\u3078\u3093\u3092\u898b\u306a\u304c\u3089\u9032\u3081\u3066\u3044\u3053\u3046<br>ref: <a href=\"https:\/\/docs.docker.jp\/docker-for-windows\/install.html\"> Windows \u306b Docker Desktop \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u2014 Docker-docs-ja 19.03 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/p>\n\n\n\n<p>\u6c17\u306b\u306a\u308b\u8a18\u8ff0\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Docker Desktop for Windows \u306f\u3001Mirosoft Windows \u7528\u306e Docker&nbsp;<a href=\"https:\/\/www.docker.com\/community-edition\">\u30b3\u30df\u30e5\u30cb\u30c6\u30a3<\/a>&nbsp;\u7248\u3067\u3059\u3002  <br> Docker Desktop \u3092 Windows 10 Home \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u60c5\u5831\u3092\u304a\u63a2\u3057\u3067\u3042\u308c\u3070\u3001&nbsp;<a href=\"https:\/\/docs.docker.jp\/docker-for-windows\/install-windows-home.html\">Windows Home \u306b Docker Desktop \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>&nbsp;\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 <\/p><cite>https:\/\/docs.docker.jp\/docker-for-windows\/install.html<\/cite><\/blockquote>\n\n\n\n<p>\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u7248\u3068\u306f\u6709\u511f\u7248\u7121\u511f\u7248\u306e\u7121\u511f\u7248\u3089\u3057\u3044\u3001Java\u306eSE\u3068EE\u307f\u305f\u3044\u306a\u3082\u3093\u304b<br>\u8a18\u8ff0\u7684\u306bWindows\u306b\u306f\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u7248(CE)\u3057\u304b\u306a\u3055\u305d\u3046\uff08\u8abf\u3079\u308b\u306e\u304c\u9762\u5012\u306b\u306a\u3063\u305f\uff09<br>Hyper-V\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u306e\u3067\u3001Pro\u4ee5\u4e0a\u304c\u5fc5\u8981<br>Home\u3067\u3082WSL2\u3092\u4f7f\u3063\u3066\u5c0e\u5165\u3067\u304d\u308b\u3088\uff01\u3068\u5225\u9014\u6848\u5185\u3092\u51fa\u3057\u3066\u3044\u308b\u3002\u512a\u3057\u3044<\/p>\n\n\n\n<p><a href=\"https:\/\/hub.docker.com\/editions\/community\/docker-ce-desktop-windows\/\">Docker Hub\u3067Docker Desktop Installer.exe<\/a>\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30b3\u3059\u308b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/auto.meto4d.pgw.jp\/blog_images\/2021-09-06_1.jpg\" alt=\"\" width=\"353\" height=\"244\"\/><figcaption>\u30a4\u30f3\u30b9\u30b3\u958b\u59cb\u753b\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u306a\u3093\u3067\u3082\u30c1\u30a7\u30c3\u30af\u5165\u308c\u305f\u72b6\u614b\u3067OK\u62bc\u3057\u3066\u3048<\/p>\n\n\n\n<p>Install required Windows components for WSL2<br>\u306e\u610f\u5473<br>\u76f4\u8a33\u3067\u306f\u3001\u5fc5\u8981\u306aWSL2\u7528\u306eWindows\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<br>\u308f\u304b\u308b<br>\u3053\u306e\u30e1\u30a4\u30f3PC\u306b\u306fWSL2\u304c\u5165\u3063\u3066\u306a\u3044<\/p>\n\n\n\n<p>\u3069\u3046\u3082WSL2\u3078\u306e\u79fb\u884c\u304c\u5fc5\u8981\u304b\u3082\u3057\u308c\u306a\u3044<br>\u3053\u306e\u969b\u3060\u304b\u3089\u3084\u3063\u3066\u304a\u3053\u3046<br>WSL1\u3092\u4f7f\u3044\u7d9a\u3051\u308b\u7406\u7531\u3082\u306a\u3044<\/p>\n\n\n\n<h3>WSL1\u304b\u3089WSL2\u3078\u79fb\u52d5<\/h3>\n\n\n\n<p>\u3053\u3053\u3092\u53c2\u8003\u306b1\u304b\u30892\u3078\u79fb\u884c\u3059\u308b<br>ref: <a href=\"http:\/\/www.aise.ics.saitama-u.ac.jp\/~gotoh\/WSL1ToWSL2.html\"> WSL1\u304b\u3089WSL2\u3078\u306e\u79fb\u884c<\/a><\/p>\n\n\n\n<p>\u307e\u305a\u306f\u73fe\u72b6\u306e\u78ba\u8a8d\u3068WSL2\u7528\u8a2d\u5b9a\u306e\u6709\u52b9\u5316<br>\u30fbWindows\u306e\u30d3\u30eb\u30c9\u304c18362\u4ee5\u4e0a\u304b\u78ba\u8a8d<br>\u30fb\u300cWindows\u306e\u8a2d\u5b9a\u2192\u30a2\u30d7\u30ea\u2192\u30aa\u30d7\u30b7\u30e7\u30f3\u6a5f\u80fd\u2192Windows\u306e\u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u300d\u304b\u3089\u4eee\u60f3\u30de\u30b7\u30f3\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u6709\u52b9\u5316<br>\uff08\u3082\u3057\u304f\u306fPowerShell\u304b\u3089\u6709\u52b9\u5316\uff09<br>\u2192\u5fc5\u8981\u3067\u3042\u308c\u3070\u518d\u8d77\u52d5\u3059\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; ver\nMicrosoft Windows [Version 10.0.19042.804]\n\u219219042\u306a\u306e\u3067WSL2\u306e\u5fc5\u8981\u6761\u4ef6\u306f\u30af\u30ea\u30a2\n\u2192\u7ba1\u7406\u8005\u6a29\u9650\u3067WSL\u306e\u6a5f\u80fd\u3092\u6709\u52b9\u5316\u3059\u308b\ncmd&gt; sudo powershell\n\nPS&gt; dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart \n\u2192\u30a2\u30d7\u30ea\u304b\u3089\u3067\u3082\u8a2d\u5b9a\u3067\u304d\u308b\u304c\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3060\u3051\u3067\u5b8c\u7d50\u3067\u304d\u305f\u306e\u3067\u3001\u3053\u3061\u3089\u3067<\/pre><\/div>\n\n\n\n<p>\u6b63\u76f4\u3001WSL1\u3068\u304b\u304c\u6d41\u884c\u3063\u3066\u305f\u3068\u304d\u306f\u3001\u3053\u306e\u8fba\u306e\u4eee\u60f3\u5316\u6280\u8853\u3092ON\u306b\u3059\u308b\u3068VMware\u304c\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u308a\u3001OFF\u306b\u3059\u308b\u3068Bluestack\u3068\u304b\u304c\u52d5\u304b\u306a\u304b\u3063\u305f\u308a\u3067\u3059\u3054\u304f\u5acc\u306a\u601d\u3044\u3092\u3057\u3066\u3044\u305f\u3002<br>\u4ffa\u306f\u6574\u7406\u3067\u304d\u306a\u3044\u4eba\u9593\u306a\u306e\u3067\u3001\u518d\u8d77\u52d5\u306f\u3057\u305f\u304f\u306a\u3044\u30de\u30f3\u306a\u3093\u3060<br>\u3057\u308c\u3063\u3068Windows\u3067sudo\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u308c\u306f\u3059\u3054\u304f\u4fbf\u5229\u3060\u304b\u3089\u7d76\u5bfe\u3044\u308c\u305f\u307b\u3046\u304c\u826f\u3044<br>ref: <a href=\"https:\/\/qiita.com\/AinoMegumi\/items\/fd56711fe1fd2a0e1bbf\"> Windows\u3067sudo\u3057\u305f\u3044 &#8211; Qiita <\/a><\/p>\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u518d\u8d77\u52d5<br>\u3053\u306e\u6642\u6c17\u3065\u3044\u305f\u304cuptime 19days\u3068\u304b\u51fa\u3066\u3066\u7b11\u3063\u305f<br>\u518d\u8d77\u52d5\u3057\u305f\u3089Linux\u30ab\u30fc\u30cd\u30eb\u66f4\u65b0\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30b3\u3059\u308b<br>\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u306e\u624b\u98064\u306bLinux\u30ab\u30fc\u30cd\u30eb\u66f4\u65b0\u306e.msi\u304c\u3042\u308b<br>ref: <a href=\"https:\/\/docs.microsoft.com\/ja-jp\/windows\/wsl\/install-win10\">\u624b\u9806 4 &#8211; Linux \u30ab\u30fc\u30cd\u30eb\u66f4\u65b0\u30d7\u30ed\u30b0\u30e9\u30e0 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/a><br>\u2192wsl_update_x64.msi\u304c\u52d5\u304f\u3002\u4e00\u77ac\u3067\u5b8c\u4e86\u3057\u305f\u3002<\/p>\n\n\n\n<p>wsl\u306e\u30c7\u30d5\u30a9\u30eb\u30c8version\u30922\u306b\u3057\u3066\u3001wsl\u3067\u52d5\u304flinux\u3082wsl2\u3067\u52d5\u304f\u3088\u3046\u306b\u3059\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; sudo cmd\n\u2192\u4e00\u5fdc\u7ba1\u7406\u8005\u6a29\u9650\u306ecmd\u3067\u4f5c\u696d\n\ncmd&gt; wsl --set-default-version 2\nWSL 2 \u3068\u306e\u4e3b\u306a\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u3001https:\/\/aka.ms\/wsl2 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\n\n\u2192get-default-version\u307f\u305f\u3044\u306a\u30b3\u30de\u30f3\u30c9\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u7d50\u69cb\u8ff7\u3063\u305f\nwsl\u3067\u52d5\u304fLinux\u306eversion\u3092\u78ba\u8a8d\ncmd&gt; wsl --list -v\n  NAME      STATE           VERSION\n* Ubuntu    Stopped         1\n\u2192Ubuntu \u304cWSL1\u3067\u52d5\u304f\u69d8\u306b\u306a\u3063\u3066\u3044\u308b\u3001\u3053\u308c\u30922\u306b\u3059\u308b\n\ncmd&gt; wsl --set-version Ubuntu 2\n\u5909\u63db\u4e2d\u3067\u3059\u3002\u3053\u306e\u51e6\u7406\u306b\u306f\u6570\u5206\u304b\u304b\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059...\nWSL 2 \u3068\u306e\u4e3b\u306a\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u3001https:\/\/aka.ms\/wsl2 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\n\u5909\u63db\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\n\n\u2192\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308b\ncmd&gt; wsl -l -v\n  NAME      STATE           VERSION\n* Ubuntu    Stopped         2\n\u2192WSL2\u306b\u306a\u3063\u305f<\/pre><\/div>\n\n\n\n<p>WSL2\u306a\u3089\u3067\u306f\u306a\u30c6\u30b9\u30c8\u51fa\u529b\u304c\u3042\u308c\u3070\u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u30c6\u30b9\u30c8\u51fa\u6765\u305f\u304c\u3001\u3053\u3053\u3067\u306f<s>\u9762\u5012\u306a\u306e\u3067<\/s>docker\u3092\u5165\u308c\u308b\u3053\u3068\u304c\u4e3b\u76ee\u7684\u306a\u306e\u3067\u307b\u3063\u305f\u3089\u304b\u3059\u3002<\/p>\n\n\n\n<h3>Docker\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306b\u623b\u3063\u3066\u4f5c\u696d<\/h3>\n\n\n\n<p>OK\u62bc\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>You must log out of Windows to complete installation<br>\u2192\u518d\u8d77\u52d5\u307e\u3067\u306f\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u3001\u30ed\u30b0\u30a2\u30a6\u30c8\u3068\u30ed\u30b0\u30a4\u30f3\u3060\u3051\u304c\u631f\u307e\u308b<\/p>\n\n\n\n<h2>Docker on Windows\u304c\u59cb\u307e\u308b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1-1024x590.png\" alt=\"\" class=\"wp-image-101\" width=\"512\" height=\"295\" srcset=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1-1024x590.png 1024w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1-300x173.png 300w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1-768x443.png 768w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1-1200x692.png 1200w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-1.png 1247w\" sizes=\"(max-width: 512px) 85vw, 512px\" \/><figcaption>Get started with Docker in a few easy steps! (Docker tutorial)<\/figcaption><\/figure>\n\n\n\n<p>\u3044\u304d\u306a\u308a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304c\u59cb\u307e\u3063\u305f<br>\u3044\u3044\u3060\u308d\u3046<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-2.png\" alt=\"\" class=\"wp-image-102\" width=\"467\" height=\"435\" srcset=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-2.png 623w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-2-300x279.png 300w\" sizes=\"(max-width: 467px) 85vw, 467px\" \/><figcaption>Docker tutorial &#8211; First<\/figcaption><\/figure>\n\n\n\n<p>k8s\u3067\u3088\u304f\u898b\u308b\u30b3\u30de\u30f3\u30c9\u3060<br>\u30b3\u30f3\u30c6\u30ca\u3067git\u3092\u52d5\u304b\u3057\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u30ed\u30fc\u30ab\u30eb\u306b\u30d5\u30a1\u30a4\u30eb\u30b3\u30d4\u30fc\u3092\u3059\u308b\u3088\u3046\u3060<br>\u6b63\u76f4\u3001\u307e\u305aapline\u306e\u30a4\u30e1\u30fc\u30b8\u3092DL\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u3053\u3060\u3051\u52d5\u304b\u3057\u3066\u304a\u304f<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker run --name test alpine\n\u2192alpine:latest\u3092DL\u3057\u3066\u52d5\u304b\u3059\u5b9f\u884c\u6587\u304c\u51fa\u3066\u3044\u305f\u304c\u3001\u30b3\u30d4\u30da\u30df\u30b9\u3057\u3066\u8a18\u4e8b\u306b\u6301\u3063\u3066\u3053\u308c\u306a\u304b\u3063\u305f\nPS&gt; docker ps -a\nCONTAINER ID   IMAGE     COMMAND     CREATED          STATUS                      PORTS     NAMES\n79d3535dced6   alpine    &quot;\/bin\/sh&quot;   53 seconds ago   Exited (0) 51 seconds ago             test\n\u2192\u3061\u3083\u3093\u3068alpine\u3092\u6301\u3063\u3066\u304d\u3066\u52d5\u304b\u305b\u3066\u3044\u308b\u3088\u3046\u3060\nPS&gt; docker rm test\n\u2192\u304a\u6383\u9664<\/pre><\/div>\n\n\n\n<p>\u5f93\u3063\u3066\u30b3\u30de\u30f3\u30c9\u3092\u3084\u308b<br>\u3068\u3044\u3046\u304b\u3001\u753b\u9762\u5de6\u306b\u51fa\u3066\u3044\u308b\u9752\u3044\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089powershell\u3067\u52dd\u624b\u306b\u5b9f\u884c\u3055\u308c\u305f<br>\u7126\u3063\u3066\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5909\u3048\u305f\u308a\u3057\u305f<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker run --name repo alpine\/git clone https:\/\/github.com\/docker\/getting-started.git\nPS&gt; docker cp repo:\/git\/getting-started\nPS&gt; start .\n\u2192\u5165\u308c\u3066\u307b\u3057\u304f\u306a\u3044\u3068\u3053\u306b\u5165\u308c\u3061\u3083\u3063\u305f\u306e\u3067\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u3067\u79fb\u52d5\u3055\u305b\u308b\nPS&gt; cd unko\/docker\n\u2192docker\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3082\u7528\u610f\u3057\u305f\u306e\u3067\u3001\u305d\u3053\u3067\nPS&gt; docker build -t docker101tutorial .\n\u2192getting-start\u306b\u306fdocker\u7528\u30a4\u30e1\u30fc\u30b8\u304c\u542b\u307e\u308c\u3066\u3044\u308b<\/pre><\/div>\n\n\n\n<p>Dockerfile\u3092\u3061\u3087\u3063\u3068\u898b\u3066\u307f\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;textile&quot;,&quot;mime&quot;:&quot;text\/x-textile&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Dockerfile&quot;,&quot;language&quot;:&quot;Textile&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;textile&quot;}\">\u5927\u307e\u304b\u306b\u306f\u3053\u3046\n# python\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nFROM python:alpine AS base\nRUN pip install -r requirements.txt\n\n# Nodejs\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nFROM node:12-alpine AS app-base\nRUN yarn install\n\n# Nodejs\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092zip\u5316\nFROM app-base AS app-zip-creator\nRUN zip -r \/app.zip \/app\n\n# \u30dd\u30fc\u30c88000\u3067mkdocs\u9bd6\u3092\u5b9f\u884c\n# mkdocs\u306fpython\u3067\u52d5\u304fmarkdown\u5f62\u5f0f\u306e\u30b5\u30a4\u30c8\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\nFROM base AS dev\nCMD [&quot;mkdocs&quot;, &quot;serve&quot;, &quot;-a&quot;, &quot;0.0.0.0:8000&quot;]\n\n# mkdocs\u3067\u9759\u7684\u30b5\u30a4\u30c8\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\nFROM base AS build\nRUN mkdocs build\n\n# Nginx\u3092\u52d5\u304b\u3059\nFROM nginx:alpine\nCOPY --from=app-zip-creator \/app.zip \/usr\/share\/nginx\/html\/assets\/app.zip\nCOPY --from=build \/app\/site \/usr\/share\/nginx\/html<\/pre><\/div>\n\n\n\n<p>\u8981\u306f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u542b\u307e\u308c\u308b\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u306e\u30b5\u30a4\u30c8\u3092mkdocs\u3084\u3089\u3067\u52d5\u304b\u3057\u3066\u3001\u305d\u308c\u3092nginx\u3067\u898b\u308b\u3088\u3046\u306a\u611f\u3058\u3060\u308d\u3046<br>\u4f55\u5ea6\u3082\u8a00\u3063\u3066\u3044\u304d\u305f\u3044\u304c\u3001\u4ffa\u306f\u4eca\u307e\u3067\u96f0\u56f2\u6c17\u3067Docker\u3092\u4f7f\u3063\u3066\u3044\u308b\u3002Docker\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306b\u306f\u8a73\u3057\u304f\u3066\u3082\u3001Docker\u306f\u8a73\u3057\u304f\u306a\u3044\u3002\u96f0\u56f2\u6c17\u3067\u8aad\u3093\u3067\u3044\u308b<br>\u4ffa\u3082Docker\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u7406\u89e3\u3059\u308b\u305f\u3081\u306e\u74b0\u5883\u69cb\u7bc9\u3060<\/p>\n\n\n\n<p>\u51fa\u6765\u4e0a\u304c\u3063\u305fDocker\u30a4\u30e1\u30fc\u30b8\u3092\u898b\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker image ls\nREPOSITORY          TAG       IMAGE ID       CREATED          SIZE\ndocker101tutorial   latest    5714b8ce5266   29 minutes ago   27.9MB\nalpine\/git          latest    a939554ad0d0   2 weeks ago      25.1MB\nalpine              latest    28f6e2705743   2 weeks ago      5.61MB\n\u2192docker101tutorial\u306e\u30a4\u30e1\u30fc\u30b8\u304c\u51fa\u6765\u3066\u3044\u308b\u3002\u5bb9\u91cf\u3082\u8efd\u3044\u3057\u3044\u3044\u306d<\/pre><\/div>\n\n\n\n<p>\u30b3\u30f3\u30c6\u30ca\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u30dd\u30fc\u30c880\u3092\u30ed\u30fc\u30ab\u30eb\u306e\u30dd\u30fc\u30c8\u306b\u5272\u5f53\u3057\u3001\u5b9f\u884c<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker run -d -p 12340:80 --name docker-tutorial docker101tutorial\n\u2192\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f80\u306b\u5272\u308a\u5f53\u3066\u3060\u3063\u305f\u304c\u3001\u30e1\u30a4\u30f3PC\u306780\u306f\u3059\u3067\u306b\u4f7f\u3063\u3066\u3044\u308b\uff08\u306f\u305a\uff09\u306a\u306e\u3067\u3001\u9069\u5f53\u306a\u30dd\u30fc\u30c8\u306b\n<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-3.png\" alt=\"\" class=\"wp-image-103\" width=\"458\" height=\"323\" srcset=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-3.png 610w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-3-300x211.png 300w\" sizes=\"(max-width: 458px) 85vw, 458px\" \/><figcaption>\u3044\u3064\u3082\u306e\u3084\u3064<\/figcaption><\/figure>\n\n\n\n<p>\u3053\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8b66\u544a\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u4fc2\u3067\u521d\u56de\u5b9f\u884c\u6642\u306b\u805e\u3044\u3066\u304f\u308b\u3051\u3069\u3001\u521d\u56de\u4ee5\u964d\u306f\u51fa\u3066\u3053\u306a\u3044\u3057\u3001<br>\u4e00\u56de\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u305f\u5f8c\u3001\u3082\u3046\u4e00\u5ea6\u958b\u3044\u305f\u308a\u3001\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3068\u304d\u306f\u3069\u3046\u3059\u308b\u3093\u3060\u308d\u3046\u304b<br>\u3059\u3050\u8a71\u304c\u9038\u308c\u308b<\/p>\n\n\n\n<p>Nginx\u3067\u63a5\u7d9a\u5f85\u53d7\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u308b<br>localhostv4\u306fSystem32\/driver\/etc\/hosts\u3092\u3044\u3058\u3063\u3066 IPv4\u306elocalhost\u3068\u660e\u8a18\u3057\u305f\u3084\u3064<br>http:\/\/localhostv4:12340\/<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-4.png\" alt=\"\" class=\"wp-image-104\" width=\"457\" height=\"366\" srcset=\"https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-4.png 913w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-4-300x240.png 300w, https:\/\/auto.meto4d.pgw.jp\/blog\/wp-content\/uploads\/2021\/03\/image-4-768x615.png 768w\" sizes=\"(max-width: 457px) 85vw, 457px\" \/><\/figure>\n\n\n\n<p>OK!<br>\u3068\u308a\u3042\u3048\u305adocker\u306f\u52d5\u3044\u305f<br>\u5f8c\u306f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6383\u9664<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker ps\n\u2192docker-tutorial\u304c\u52d5\u3044\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\nPS&gt; docker stop docker-tutorial\nPS&gt; docker rm docker-tutorial\nPS&gt; docker ps -a\n\u2192\u30ed\u30b0\u78ba\u8a8d\u7528\u7b49\u3005\u306e\u305f\u3081\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u6b8b\u308a\u3082\u306e\u3082\u7121\u304f\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\nstop\u305b\u305a\u76f4\u63a5rm\u3068\u304b\u51fa\u6765\u306a\u3044\u306e\u304b\u306a\uff1f(--rm\u3067run\u3059\u308b\u306e\u306f\u9664\u304f)<\/pre><\/div>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u7d42\u308f\u3063\u305f\u3057\u3001\u6700\u4f4e\u9650\u306e\u30e9\u30a4\u30f3\u306f\u7d42\u308f\u3063\u305f\u3067\u3057\u3087\u3046\u3002\u3002<br>\u3053\u306edocker101tutorial\u30a4\u30e1\u30fc\u30b8\u306e\u4e2d\u8eab\u3092\u3061\u3087\u3063\u3068\u898b\u3066\u307f\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">PS&gt; docker run --rm --name test -it docker101tutorial \/bin\/sh\n\/ # cat \/etc\/nginx\/nginx.conf\n\/ # cat \/etc\/nginx\/conf.d\/default.conf\n\u2192\u666e\u901a\u306enginx.conf\u3068default.conf\u3060\u3063\u305f\n\/ # ls \/usr\/share\/nginx\/html;\n404.html        assets          fonts           index.html      sitemap.xml     tutorial\n50x.html        css             images          search          sitemap.xml.gz\n\u2192docs\u3067\u4f5c\u3089\u308c\u305f\u3067\u3042\u308d\u3046\u30d5\u30a1\u30a4\u30eb\u7fa4\u304c\u5165\u3063\u3066\u3044\u308b\n\/ # cat \/proc\/cpuinfo\n(\u629c\u7c8b) model name      : Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n\u2192hostPC\u306e\u60c5\u5831\u3092\u6301\u3063\u3066\u304d\u3066\u3044\u308b\u306a\u3001docker\u3063\u3066\u305d\u3046\u3044\u3046\u3082\u306e\u306a\u306e\u304b\n\/ # cat \/proc\/meminfo\nMemTotal:       26144932 kB\nVmallocTotal:   34359738367 kB\n\u219226GB\u7a0b\u5ea6\u306e\u30e1\u30e2\u30ea\u304c\u4f7f\u3048\u308b\uff1f\n\u2192vmmem\u3068\u3044\u3046WSL2\u30d7\u30ed\u30bb\u30b9\u304c3.5G\u7a0b\u5ea6\u30e1\u30e2\u30ea\u3092\u5c02\u6709\u3057\u3066\u3044\u305f\u304cdocker\u304c\u4f7f\u3063\u3066\u3044\u308b\u3093\u3060\u308d\u3046\u304b\n\/ # cat \/etc\/os-release\nNAME=&quot;Alpine Linux&quot;\n\u2192Alpine\u306fAlpine\u3060\u3063\u305f<\/pre><\/div>\n\n\n\n<p>\u4e88\u60f3\u901a\u308a\u3068\u3044\u3046\u304b\u306a\u3093\u3068\u3044\u3046\u304b\u3001\u3001<br>\u5f8c\u306f\u597d\u304d\u306bNginx\u3060\u3051\u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u304f<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">vmmem\u306b\u3064\u3044\u3066\u3061\u3087\u3063\u3068\u6c17\u306b\u306a\u3063\u305f\u306e\u3067\ncmd&gt;wsl -l -v\n  NAME                   STATE           VERSION\n* Ubuntu                 Running         2\n  docker-desktop         Running         2\n  docker-desktop-data    Running         2\n\u2192\u78ba\u304b\u306bwsl\u306bdocker\u7528\u304c\u51fa\u6765\u3066\u3044\u308b\u3002\nwsl\u304b\u3089\u30ea\u30bd\u30fc\u30b9\u3092\u5f15\u3063\u5f35\u3063\u3066\u304d\u3066\u3044\u308b\u3063\u307d\u3044\u3001\u306e\u304b\u306a\uff1f<\/pre><\/div>\n\n\n\n<h2>Nginx\u3060\u3051\u306e\u30a4\u30e1\u30fc\u30b8<\/h2>\n\n\n\n<p>Nginx\u3060\u3051\u306e\u30a4\u30e1\u30fc\u30b8\u3068\u8a00\u3063\u305f\u304c\u3001\u6b63\u78ba\u306b\u306f\u30c1\u30e7\u30c3\u30c8\u30c1\u30ac\u30a6<br>Nginx\u3060\u3051\u306e\u30a4\u30e1\u30fc\u30b8\u3060\u304c\u3001test\u7528\u306eTOP\u30da\u30fc\u30b8\u3068\u3001nginx.conf\u3092\u3044\u3058\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u4f5c\u308a\u305f\u3044<br>conf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068html\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u3001\u305d\u308c\u305e\u308c\/etc\/nginx\/\u306b\u30b3\u30d4\u30fc\u3001\/usr\/share\/nginx\/html\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3088\u3046\u306b\u3057\u3088\u3046<\/p>\n\n\n\n<h3>Nginx\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/h3>\n\n\n\n<p>nginx.conf\u30921\u304b\u3089\u66f8\u304f\u306e\u306f\u9762\u5012\u3002<br>\u3061\u3087\u3046\u3069nginx\u3092\u305d\u306e\u307e\u307e\u8d77\u52d5\u3057\u305f\u3089\u521d\u671f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u5165\u3063\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001docker\u304b\u3089\u6301\u3063\u3066\u304f\u308b<br>\u3053\u308c\u306f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3084\u3063\u305f\u3053\u3068\u306a\u306e\u3067\u3001\u7279\u306b\u8aac\u660e\u306f\u3044\u3089\u306a\u3044\u3060\u308d\u3046\u2026<br>\u4ffa\u306f\u96f0\u56f2\u6c17\u3067docker\u3092\u3084\u3063\u3066\u3044\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">test_nginx\u3067nginx\u3092\u5b9f\u884c\u3059\u308b\ncmd&gt; docker run -d --rm --name test_nginx nginx:alpine\n\u2192nginx:alpine\u3067dockerhub\u306b\u3042\u308b\u516c\u5f0fnginx\u3092\u5b9f\u884c\n\u2192-d\u3067\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c\u3001--rm\u3067\u6b62\u3081\u305f\u3068\u304d\u306b\u81ea\u52d5\u524a\u9664\n\nnginx\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u3061\u3087\u3063\u3068shell\u3067\u898b\u3066\u307f\u308b\ncmd&gt; docker exec -it test_nginx sh\n\u2192-it\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306atty\u3092\u5272\u308a\u5f53\u3066\u3066sh\u3092\u5b9f\u884c\u3059\u308b\n\u2192alpine\u306fbash\u304c\u306a\u3044\u3088\u3046\u3060(zsh\u306f\u3042\u3063\u305f\u308a\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u3063\u307d\u3044\u304c)\n\n\u6a19\u6e96\u306e\u5834\u6240\u306b\u6a19\u6e96\u306e\u30d5\u30a1\u30a4\u30eb\u90e1\u304c\u3042\u308b\u304b\u898b\u308b\n\/ # ls \/etc\/nginx\nconf.d          fastcgi_params  koi-win         modules         scgi_params     win-utf\nfastcgi.conf    koi-utf         mime.types      nginx.conf      uwsgi_params\n\u2192\u3088\u304f\u898b\u308b\u30d5\u30a1\u30a4\u30eb\u7fa4\n\n\u3061\u3087\u3063\u3068\u8997\u304f\n\/ # head -5 \/etc\/nginx\/nginx.conf\n\nuser  nginx;\nworker_processes  auto;\n\nerror_log  \/var\/log\/nginx\/error.log warn;\n\u2192\u3088\u304f\u898b\u308b\u3084\u3064\u3060\nCtrl+D\u3067logout(\u8077\u5834\u3067\u3082Ctrl+D\u3060\u3063\u305f\u308a\u3057\u3063\u304b\u308alogout or exit\u3092\u5165\u529b\u3057\u3066\u3044\u305f\u308a\u3001\u3069\u308c\u304c\u3044\u3044\u306e\u3060\u308d\u3046\u304b)\n\/ # ^D \ncmd&gt;\n\n\u30ed\u30fc\u30ab\u30eb\u306b\u6301\u3063\u3066\u304f\u308b\ncmd&gt; cd ..\/tiny-nginx\ncmd&gt; docker cp test_nginx:\/etc\/nginx\/nginx.conf .\/\ncmd&gt; docker cp test_nginx:\/etc\/nginx\/conf.d .\/\n\u2192\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068cp\u3082\u3044\u3051\u305f\ncmd&gt; dir\n(\u629c\u7c8b)\n-a----        2021\/02\/17      1:25            646 nginx.conf\nda----        2021\/03\/11      7:07                conf.d\n\u2192\u6301\u3063\u3066\u3053\u308c\u305f\u307f\u305f\u3044\u3060\n\u2192cp\u306f\u57fa\u672cunix\u306ecp -a\u3068\u540c\u3058\u3089\u3057\u3044<\/pre><\/div>\n\n\n\n<p>docker\u3067nginx:alpine\u3060\u3068\u304bnginx:latest\u3060\u3068\u304b\u3092\u5c11\u3057\u7406\u89e3\u3057\u305f\u3044<br>\u516c\u5f0f\u306f\u307e\u3060\u898b\u3066\u3044\u306a\u3044\u306e\u3060\u304c\u3001\u3053\u308c\u3060\u3051\u3067dockerhub\u516c\u5f0f\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u843d\u3068\u305b\u308b\u3089\u3057\u3044<br>\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u5834\u5408\u306f\u3053\u306e\u30b3\u30de\u30f3\u30c9<br><code>$ docker search nginx<\/code><br>\u96f0\u56f2\u6c17\u304b\u3089\u3057\u3066\u3001\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8\u306f<code>nginx:latest<\/code>\u3001unko\u3055\u3093\u306e\u4f5c\u3063\u305f\u30ab\u30b9\u30bf\u30e0\u30a4\u30e1\u30fc\u30b8(\u975e\u516c\u5f0f)\u306f<code>unko\/nginx:latest<\/code> \u3060\u308d\u3046<br>ref: <a href=\"https:\/\/qiita.com\/zembutsu\/items\/24558f9d0d254e33088f\"> Docker\u30a4\u30e1\u30fc\u30b8\u306e\u7406\u89e3\u3092\u76ee\u6307\u3059\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb &#8211; Qiita <\/a><\/p>\n\n\n\n<p>\u3053\u306e\u6642\u6c17\u3065\u3044\u305f\u306e\u3060\u304c\u3001alpine\u3060\u3051\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u5148\u306bDL\u3057\u3066\u304a\u304f\u306e\u306fpull\u30b3\u30de\u30f3\u30c9\u3067\u3067\u304d\u308b\u3089\u3057\u3044<br><code>$ docker pull alpine<\/code><br>k8s\u3067\u3082\u3053\u306e\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u308b\u3088\u3046\u3060\u3002\u77e5\u3089\u306a\u304b\u3063\u305f\u3002\u3053\u3046\u3044\u3046\u3053\u3068\u306b\u6c17\u4ed8\u3051\u308b\u306e\u306f\u3042\u308a\u304c\u305f\u3044\u3002<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u3001cp\u30b3\u30de\u30f3\u30c9\u3067\u306e\u30d1\u30b9\u306f<br>\u30b3\u30f3\u30c6\u30ca\u306b\u5bfe\u3057\u3066\u306f\u5fc5\u305a\/(root) \u304b\u3089\u306e\u7d76\u5bfe\u30d1\u30b9<br>\u30ed\u30fc\u30ab\u30eb\u306b\u5bfe\u3057\u3066\u306f\u73fe\u5728\u306e\u4f5c\u696d\u30d1\u30b9\u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9<br>\u306b\u306a\u308b\u3089\u3057\u3044<br>\u30b3\u30f3\u30c6\u30ca\u306e\/(root)\u6307\u5b9a\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067<code>\/etc\/nginx<\/code>\u306f<code>etc\/nginx<\/code>\u3068\u540c\u3058\u3089\u3057\u3044<br>ref: <a href=\"https:\/\/docs.docker.jp\/engine\/reference\/commandline\/cp.html\"> cp \u2014 Docker-docs-ja 19.03 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 <\/a>  <br>\u3053\u3046\u3044\u3046\u3068\u304d\u3060\u3051\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u898b\u308b\u30de\u30f3<\/p>\n\n\n\n<p>conf\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066\u305d\u306e\u4e2d\u3067nignx\u306econf\u3092\u89e6\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; mkdir conf\ncmd&gt; cd conf<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;nginx&quot;,&quot;mime&quot;:&quot;text\/x-nginx-conf&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Nginx&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;nginx&quot;}\">user  nginx;\nworker_processes  2;\n\nerror_log  \/var\/log\/nginx\/error.log warn;\npid    \/var\/run\/nginx.pid;\n\nevents {\n  worker_connections  1024;\n  multi_accept on;\n}\n\nhttp {\n  include     \/etc\/nginx\/mime.types;\n  default_type  application\/octet-stream;\n\n  log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '\n            '$status $body_bytes_sent &quot;$http_referer&quot; '\n            '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';\n\n  access_log  \/var\/log\/nginx\/access.log  main;\n\n  sendfile    on;\n  #tcp_nopush   on;\n  server_tokens off;\n\n  keepalive_timeout  90;\n\n  server {\n    listen 80 default_server;\n    root \/usr\/share\/nginx\/html;\n    index index.html index.htm;\n    \n    location \/ {\n      \n    }\n    \n    location \/server_status {\n      stub_status;\n    }\n  }\n}\n<\/pre><\/div>\n\n\n\n<p>\u96d1\u3060\u304c\u3053\u3093\u306a\u3082\u3093\u3060\u308d\u3046<br>nginx\u304c\u30ed\u30fc\u30ab\u30eb\u306b\u306a\u3044(cmd\u3067\u3059\u3050\u4f7f\u3048\u308b\u5834\u6240\u306b\u306f\u306a\u3044)\u306e\u3067\u3001docker\u306b\u6301\u3063\u3066\u3044\u3063\u3066\u30c6\u30b9\u30c8\u3059\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker cp .\/nginx.conf test_nginx:etc\/nginx\/nginx.test.conf\ncmd&gt; docker exec -it test_nginx sh\n\/ # cd \/etc\/nginx\n\/etc\/nginx # mv nginx.conf nginx.conf.old\n\/etc\/nginx # mv nginx.test.conf nginx.conf\n\/etc\/nginx # nginx -t\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\n\nnginx\u3092reload\n\/etc\/nginx # nginx -s reload\n\u2192\u6700\u521d\u666e\u901a\u306enginx\u3068\u540c\u3058\u3088\u3046\u306bsystemctl\u3068\u304binit.d\u3068\u304b\u304b\u306a\uff1f\u3068\u304b\u8003\u3048\u3066\u305f\u3051\u3069\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067OK\u3060\u3063\u305f\n\u2192\u3082\u3061\u308d\u3093\u3001\u30b3\u30f3\u30c6\u30ca\u3092reload\u3057\u305f\u308a\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3060\u308d\u3046\u304c\u3001\u3053\u3053\u306fconf\u30d5\u30a1\u30a4\u30eb\u306e\u30c1\u30a7\u30c3\u30af\u3092\u3057\u305f\u3044\u306e\u307f\u306a\u306e\u3067\u3001nginx\u3092reload\u3057\u305f\n\n\/etc\/nginx # wget localhost -q -O -\n&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;Welcome to nginx!&lt;\/title&gt;\n&lt;style&gt;\n    body {\n        width: 35em;\n        margin: 0 auto;\n        font-family: Tahoma, Verdana, Arial, sans-serif;\n    }\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;h1&gt;Welcome to nginx!&lt;\/h1&gt;\n&lt;p&gt;If you see this page, the nginx web server is successfully installed and\nworking. Further configuration is required.&lt;\/p&gt;\n\n&lt;p&gt;For online documentation and support please refer to\n&lt;a href=&quot;http:\/\/nginx.org\/&quot;&gt;nginx.org&lt;\/a&gt;.&lt;br\/&gt;\nCommercial support is available at\n&lt;a href=&quot;http:\/\/nginx.com\/&quot;&gt;nginx.com&lt;\/a&gt;.&lt;\/p&gt;\n\n&lt;p&gt;&lt;em&gt;Thank you for using nginx.&lt;\/em&gt;&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\n\/etc\/nginx # wget localhost\/server_status -q -O -\nActive connections: 1\nserver accepts handled requests\n 5 5 5\nReading: 0 Writing: 1 Waiting: 0\n\n\u2192\u3061\u3083\u3093\u3068stub_status\u306e\u8a2d\u5b9a\u304c\u52b9\u3044\u3066\u3044\u305f\u3002\u3084\u308a\u305f\u3044\u3053\u3068\u3068\u3057\u3066\u306fOK\u3060\u308d\u3046<\/pre><\/div>\n\n\n\n<p>nginx\u306estub_status\u306e\u6319\u52d5\u3092\u898b\u305f\u3044\u305f\u3081\u3001stub_status\u3092on\u306b\u3057\u305f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30c6\u30b9\u30c8<br>curl\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u3001wget<\/p>\n\n\n\n<p>\u3053\u3053\u3067\u5c11\u3057\u6c17\u306b\u306a\u3063\u305f\u306e\u3060\u304c\u3001stub_status\u95a2\u4fc2<br> \u4eca\u3001\u81ea\u5b85\u9bd6\u3067\u52d5\u3044\u3066\u3044\u308b\u6b86\u3069\u306enginx\u306f<code>stub_status  on;<\/code> \u306b\u306a\u3063\u3066\u3044\u308b\u3002<br>\u3057\u304b\u3057\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u898b\u308b\u3068\u3001 <\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>In versions prior to 1.7.5, the directive syntax required an arbitrary argument, for example, \u201c<code>stub_status on<\/code>\u201d.  <\/p><cite> <em> <\/em><a href=\"http:\/\/nginx.org\/en\/docs\/http\/ngx_http_stub_status_module.html\"> Module ngx_http_stub_status_module <\/a> <\/cite><\/blockquote>\n\n\n\n<p>\u53e4\u3044(1.7.5\u3088\u308a\u524d)\u306enginx\u306f<code>stub_status on;<\/code>\u3060\u304c\u3001\u73fe\u5728\u306f<code>stub_status;<\/code>\u306e\u307f\u3067\u826f\u3044\u3089\u3057\u3044<\/p>\n\n\n\n<p>localhost\/server_status \u3067Content-Length\u3092\u898b\u308b\u3068100\u3089\u3057\u3044\u306e\u3067\u3001\u3060\u3044\u305f\u3044100\u30d0\u30a4\u30c8\u3068\u8a18\u61b6 (\u30e1\u30e2\u7528\u3067\u3059) <\/p>\n\n\n\n<p>\u3067\u306f\u3001\u3053\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u57fa\u6e96\u306bDockerfile\u3092\u66f8\u3044\u3066\u3044\u304f<br>index.html\u306f\u7279\u8a18\u3044\u3044\u3067\u3057\u3087\u3046\u2026<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;body&gt;\n&lt;h1&gt;Hello Nginx on Docker!&lt;\/h1&gt;\nwork on dokcer\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3067\u3061\u3087\u3046\u3069100bytes<br>\u3061\u306a\u307f\u306b\u6539\u884c\u306f\\r\\n<br>index.html\u3067\u4fdd\u5b58<\/p>\n\n\n\n<h3>Nginx \u306eDockerfile\u8a18\u8ff0<\/h3>\n\n\n\n<p>\u307e\u305a\u306f\u96f0\u56f2\u6c17\u3067Dockerfile\u3092\u66f8\u304f\u3002\u66f8\u3044\u305f\u3002<br>\u7279\u306b\u554f\u984c\u306a\u304f\u52d5\u3044\u305f<br>\u306a\u306b\u304c\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u3067\u52d5\u304f\u304b\u81ea\u5206\u3067\u66f8\u304f\u3053\u3068\u306a\u304f\u52d5\u304f\u3068\u3044\u3046\u306e\u306f\u9055\u548c\u611f\u304c\u3042\u308b<\/p>\n\n\n\n<p>\u251cDockerfile<br>\u251cindex.html<br>\u2514conf\/<br>\u3000\u2514nginx.conf<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;textile&quot;,&quot;mime&quot;:&quot;text\/x-textile&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Textile&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;textile&quot;}\"># and use a nginx image to serve the content\nFROM nginx:alpine\nCOPY conf\/nginx.conf \/etc\/nginx\/\nCOPY index.html \/usr\/share\/nginx\/html\/<\/pre><\/div>\n\n\n\n<p>\u30d3\u30eb\u30c9\u3057\u3066\u52d5\u304b\u3057\u3066\u307f\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker build -t tiny-nginx .\ncmd&gt; docker image ls\ntiny-nginx          latest    92871f963da3   18 seconds ago   22.6MB\ncmd&gt; docker run -it --rm --name tiny -p 12340:80 tiny-nginx sh\n\/ #  cat \/usr\/share\/nginx\/html\/index.html\n&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;body&gt;\n&lt;h1&gt;Hello Nginx on Docker!&lt;\/h1&gt;\nwork on dokcer\n&lt;\/body&gt;\n&lt;\/html&gt;\n\n\u2192\u3061\u3083\u3093\u3068\u5165\u308c\u305findex.html\u306b\u306a\u3063\u3066\u3044\u308b<\/pre><\/div>\n\n\n\n<p>\u7279\u306b\u660e\u8a18\u3057\u306a\u304b\u3063\u305f\u304c\u3001\u4eca\u307e\u3067\u8abf\u3079\u308b\u4e0a\u3067 docker-compose.yml \u3068dockerfile\u3067\u306e\u5b9f\u884c\u9806\u306e\u8a71\u3092\u4f55\u5ea6\u304b\u898b\u305f<br>\u5b9f\u969b\u3001\u30b3\u30f3\u30c6\u30ca\u5185\u3067docker-entrypoint.sh\u304c\u52d5\u3044\u3066\u3044\u308b\u306e\u3092\u898b\u305f<br>\u3069\u3046\u3084\u3089dockerfile\u306f\u8d77\u52d5\u3059\u308b\u307e\u3048\u306b\u5b9f\u65bd\u3059\u308b\u5185\u5bb9\u3067\u3001docker-compose.yml\u306f\u30b3\u30f3\u30c6\u30ca\u304c\u52d5\u3044\u3066\u304b\u3089\u4f55\u3092\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u306b\u52d5\u304b\u3059\u304b\u3068\u3044\u3046\u3082\u306e\u306e\u3088\u3046\u3060<br>\u3064\u307e\u308a\u3001dockerfile\u306b\u66f8\u3044\u305f\u5185\u5bb9\u3001\u30aa\u30d5\u30a3\u30b7\u30e3\u30eb\u30a4\u30e1\u30fc\u30b8\u306enginx\u306b\u542b\u307e\u308c\u308bentrypoint.sh\u3067nginx\u304c\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u3001docker-compose.yml\u3067 curl localhost\u307f\u305f\u3044\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3093\u3060\u308d\u3046\u3068\u4e88\u60f3<br>\u3053\u308c\u306f\u6b21\u56de\u8abf\u3079\u3088\u3046<\/p>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u308b<br>http:\/\/localhostv4:12340\/<br><strong>\u2192\u3053\u306e\u30da\u30fc\u30b8\u306f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u305b\u3093<\/strong><br>sh\u3067\u5165\u3063\u3066\u3044\u308b\u3068\u30c0\u30e1\u306a\u306e\u304b\uff1f\u30b3\u30f3\u30c6\u30ca\u5185\u306e\u30ed\u30fc\u30ab\u30eb\u3067\u3082\u30c0\u30e1\u3067\u3057\u305f<br>\u3057\u304b\u3057\u3001docker ps -a\u3067\u898b\u3066\u307f\u308b\u3068\u3061\u3083\u3093\u3068\u52d5\u3044\u3066\u3044\u308b\u3057\u3001\u30dd\u30fc\u30c8\u30de\u30c3\u30d4\u30f3\u30b0\u3082\u51fa\u6765\u3066\u3044\u308b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker ps -a\nCONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS         PORTS                   NAMES\n2309578fa395   tiny-nginx   &quot;\/docker-entrypoint.\u2026&quot;   4 minutes ago   Up 4 minutes   0.0.0.0:12340-&gt;80\/tcp   tiny\n\u2192COMMAND\u884c\u306bdocker-entrypoint.sh\u3068\u66f8\u3044\u3066\u3042\u308b\u304b\u3089\u3001\u3066\u3063\u304d\u308a\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u7b49\u306f\u52d5\u3044\u3066\u3044\u308b\u3082\u306e\u3060\u3068\u601d\u3063\u3066\u3044\u305f<\/pre><\/div>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Docker \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u306e\u30aa\u30d7\u30b7\u30e7\u30f3 \u30b3\u30de\u30f3\u30c9 \u3092\u53d6\u308a\u6d88\u3057\u307e\u3059\u3002<br><br>$ docker run [\u30aa\u30d7\u30b7\u30e7\u30f3] \u30a4\u30e1\u30fc\u30b8[:\u30bf\u30b0|@DIGEST] [\u30b3\u30de\u30f3\u30c9] [\u5f15\u6570\u2026]<br> \u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u69d8\u3005\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30a4\u30e1\u30fc\u30b8 \u306e\u4f5c\u8005\u304c Dockerfile \u306e CMD \u547d\u4ee4\u3092\u4f7f\u3044\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e \u30b3\u30de\u30f3\u30c9 \u3092\u65e2\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3067\u3059\u3002\u4f5c\u696d\u8005\uff08\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u30b3\u30f3\u30c6\u30ca\u3092\u5b9f\u884c\u3059\u308b\u4eba\uff09\u306f\u3001 CMD \u547d\u4ee4\u3092\u4e0a\u66f8\u304d\u3057\u3066\u65b0\u3057\u3044 \u30b3\u30de\u30f3\u30c9 \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br><br>\u30a4\u30e1\u30fc\u30b8\u306b ENTRYPOINT \u3082\u6307\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001 CMD \u3084 \u30b3\u30de\u30f3\u30c9 \u306f ENTRYPOINT \u306b\u5bfe\u3059\u308b\u5f15\u6570\u3068\u306a\u308a\u307e\u3059\u3002<\/p><cite><a href=\"https:\/\/docs.docker.jp\/engine\/reference\/run.html#cmd\"> Docker run \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u2014 Docker-docs-ja 19.03 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 #cmd<\/a><\/cite><\/blockquote>\n\n\n\n<p>\u3069\u3046\u3084\u3089entrypoint\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u308bnginx \u30b3\u30de\u30f3\u30c9\u304csh\u6307\u5b9a\u306b\u3088\u3063\u3066\u4e0a\u66f8\u304d\u3055\u308c\u3066\u5b9f\u884c\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3060<br>\u3056\u3063\u3068\u8abf\u3079\u305f\u304centrypoint\u306b\u6307\u5b9a\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u8a18\u3057\u3066\u5b9f\u884c\u3068\u3044\u3046\u306e\u306f\u306a\u3044\u3088\u3046\u3060<br>exec\u3067\u5165\u308b\u3057\u304b\u306a\u3055\u305d\u3046<br>\u8a66\u3057\u306bnginx\u3092\u624b\u52d5\u30b9\u30bf\u30fc\u30c8<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker run -it --rm --name tiny -p 12340:80 tiny-nginx sh\n\/ # wget localhost -O -\nConnecting to localhost (127.0.0.1:80)\nwget: can't connect to remote host (127.0.0.1): Connection refused\n\/ # nginx\n\/ # wget localhost -O -\nConnecting to localhost (127.0.0.1:80)\n127.0.0.1 - - [11\/Mar\/2021:22:37:20 +0000] &quot;GET \/ HTTP\/1.1&quot; 200 100 &quot;-&quot; &quot;Wget&quot; &quot;-&quot;\nwriting to stdout\n&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;body&gt;\n&lt;h1&gt;Hello Nginx on Docker!&lt;\/h1&gt;\nwork on dokcer\n&lt;\/body&gt;\n&lt;\/html&gt;\n-                    100% |***********************************************************************|   100  0:00:00 ETA\nwritten to stdout<\/pre><\/div>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u305f<\/p>\n\n\n\n<p>\u8a71\u304c\u6a2a\u306b\u9038\u308c\u305f\u304c\u3001Dockerfile\u3067\u6307\u5b9a\u3057\u305fconf\u306f\u3061\u3083\u3093\u3068\u6307\u5b9a\u3057\u305f\u3082\u306e\u304c\u52d5\u3044\u3066\u3044\u308b\u304b<br>\u3082\u3061\u308d\u3093\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u624b\u52d5\u3067nginx\u3092\u8d77\u52d5\u3055\u305b\u305f\u5834\u5408\u3067\u306f\u306a\u3044<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"> cmd&gt; docker run -d --rm --name tiny -p 12340:80 tiny-nginx<\/pre><\/div>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9<br>http:\/\/localhostv4:12340\/<br>\u2192OK<br> http:\/\/localhostv4:12340\/server_status<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Active connections: 2 \nserver accepts handled requests\n 2 2 4 \nReading: 0 Writing: 1 Waiting: 1 <\/pre>\n\n\n\n<p>OK\u3060<br>\u304b\u306a\u308a\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u3088\u3046\u306a\u6c17\u304c\u3059\u308b\u304c\u3001\u3084\u308a\u305f\u3044\u6700\u5c0f\u306enginx\u30b3\u30f3\u30c6\u30ca\u306f\u51fa\u6765\u305f\u3088\u3046\u3060<\/p>\n\n\n\n<p> &#8211;rm\u6307\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067stop\u3067\u30b3\u30f3\u30c6\u30ca\u304c\u6d88\u3048\u308b\u3053\u3068\u3082\u78ba\u8a8d\u3067\u304d\u305f <\/p>\n\n\n\n<h3>php-fpm\u3060\u3051\u306e\u30b3\u30f3\u30c6\u30ca\u306b\u5411\u3051\u3066<\/h3>\n\n\n\n<p>\u3053\u308c\u306f\u6b21\u56de\u4ee5\u964d\u3067\u306e\u30d6\u30ed\u30b0\u306e\u4e3b\u984c\u306b\u306a\u308b\u3060\u308d\u3046\u304c\u3001\u3061\u3087\u3063\u3068\u8abf\u67fb\u3057\u305f\u306e\u3067\u30e1\u30e2\u7684\u306b\u3002<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001php-fpm\u3068nginx\u3092\u4e00\u3064\u306e\u30b3\u30f3\u30c6\u30ca\u306b\u540c\u68b1\u3055\u305b\u308b\u3068\u3044\u3046\u306e\u3082\u3044\u3044\u3060\u308d\u3046<br>unix\u30bd\u30b1\u30c3\u30c8\u3067\u901a\u4fe1\u3067\u304d\u308b\u3057\u3001\u4f55\u3088\u308a\u7ba1\u7406\u304c\u697d\u3060<br>\u3060\u304c\u3001php\u3060\u3051nginx\u30b3\u30f3\u30c6\u30ca\u306b\u540c\u68b1\u3055\u305b\u308b\u3068\u3044\u3046\u306e\u3082\u5909\u306a\u8a71\u3060\u3002<br>\u306a\u305c\u306a\u3089\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306fphp\u3060\u3051\u3068\u3044\u3046\u8a71\u3067\u3082\u306a\u304f\u3001\u4eca\u3069\u304d\u306fpython\u3084ruby\u306a\u3093\u304b\u306b\u3084\u3089\u305b\u308b\u3053\u3068\u304c\u591a\u3044\u3060\u308d\u3046<br>API\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092Kotlin\u3067\u3084\u3063\u3066\u3044\u308b\u306a\u3093\u3066\u8a71\u3082\u306b\u631f\u3093\u3060\u3053\u3068\u304c\u3042\u308b\u3002<br>\u3068\u306a\u308b\u3068\u3001nginx\u3060\u3051\u306e\u30b3\u30f3\u30c6\u30ca\u3001\u5404API\u30b5\u30fc\u30d0\u306e\u30b3\u30f3\u30c6\u30ca\u3001\u3068\u5206\u3051\u305f\u307b\u3046\u304c\u904b\u7528\u306f\u697d\u3060\u308d\u3046\u3002<br>\u591a\u5206k8s\u3067\u52d5\u304b\u3057\u3066Pod\u5358\u4f4d\u3067\u7ba1\u7406\u3057\u3066\u3044\u304d\u305d\u3046\u3060\u3057<\/p>\n\n\n\n<p> php-fpm\u3067\u306e\u30a4\u30e1\u30fc\u30b8\u306f\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8\u306b\u306a\u3044\u3088\u3046\u3060\u3002<br>\u3061\u306a\u307f\u306b\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u306f&#8211;filter \u306b\u3066 is-official=true \u3092\u6307\u5b9a\u3059\u308c\u3070OK<br>ref:<a href=\"https:\/\/docs.docker.jp\/engine\/reference\/commandline\/search.html#id3\"> search \u2014 Docker-docs-ja 19.03 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 #\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/a>  <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker search php-fpm --filter is-official=true\nNAME      DESCRIPTION   STARS     OFFICIAL   AUTOMATED\ncmd&gt; \n\u2192\u30ea\u30b9\u30c8\u3067\u51fa\u3066\u3053\u306a\u3044\u306e\u3067\u3001\u7121\u3044\u3088\u3046\u3060<\/pre><\/div>\n\n\n\n<p>\u8abf\u3079\u305f\u3068\u3053\u308d\u3001php:&lt;version&gt;-fpm\u3067\u30a4\u30e1\u30fc\u30b8\u304c\u4f5c\u3089\u308c\u3066\u3044\u308b\u3089\u3057\u3044\u3002<br>ref: <a href=\"https:\/\/hub.docker.com\/_\/php\">php &#8211; hub.docker.com<\/a><br>\u3084\u3084\u3053\u3057\u3044\u2026<\/p>\n\n\n\n<h4>php\u306ever8.0.x\u306efpm\u30a4\u30e1\u30fc\u30b8\u3092\u63a2\u3059<\/h4>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u6642\u70b9\u3067\u306e\u6700\u65b0\u7248\u306fphp\u306f8.0.3\u304c\u6700\u65b0\u3060\u3063\u305f\u3002(2021\/03\/15 07:30 JST)<br>\u4e0a\u8a18php\u306e\u53c2\u7167\u30ea\u30f3\u30af\u306b\u306fphp:&lt;version&gt;-fpm\u3067\u5165\u308c\u3089\u308c\u308b\u3089\u3057\u3044\u304c\u3001\u30b5\u30dd\u30fc\u30c8\u30bf\u30b0\u306b\u306f <a href=\"https:\/\/github.com\/docker-library\/php\/blob\/64811791f0682262478d73514819908fcfe73d7f\/8.0\/alpine3.13\/fpm\/Dockerfile\"><code>8.0.3-fpm-alpine<\/code><\/a> \u3068\u3042\u308b\u3002<br>\u3069\u3063\u3061\u3060\uff1f<br>\u8a66\u3057\u306b\u5165\u308c\u3066\u307f\u3088\u3046<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker run -it --rm php:8.0.3-fpm sh\n8.0.3-fpm: Pulling from library\/php\n...(\u7701\u7565)\n8.0.3-fpm: Pulling from library\/php\n# ls\n# ls\n# ls -al\ntotal 8\ndrwxrwxrwx 2 www-data www-data 4096 Mar 13 02:16 .\ndrwxr-xr-x 3 root     root     4096 Mar 13 02:16 ..\n# cd \/\n# ls -al\ntotal 72\n-rwxr-xr-x   1 root root    0 Mar 14 22:52 .dockerenv\ndrwxr-xr-x   1 root root 4096 Mar 13 02:16 bin\ndrwxr-xr-x   2 root root 4096 Jan 30 17:37 boot\n...(\u7701\u7565)\n# echo $PS1\n#\n#\n\u2192\u3053\u308c\u306f\u6c17\u6301\u3061\u60aa\u3044\u304c\u3001\u307e\u3042\u52d5\u3044\u3066\u3044\u308b\u3053\u3068\u306f\u78ba\u8a8d\u3067\u304d\u305f\n# cat \/etc\/os-release\nPRETTY_NAME=&quot;Debian GNU\/Linux 10 (buster)&quot;\nNAME=&quot;Debian GNU\/Linux&quot;\nVERSION_ID=&quot;10&quot;\nVERSION=&quot;10 (buster)&quot;\nVERSION_CODENAME=buster\nID=debian\nHOME_URL=&quot;https:\/\/www.debian.org\/&quot;\nSUPPORT_URL=&quot;https:\/\/www.debian.org\/support&quot;\nBUG_REPORT_URL=&quot;https:\/\/bugs.debian.org\/&quot;<\/pre><\/div>\n\n\n\n<p>\u4e0a\u306edockerhub\u306ephp\u306b\u5bfe\u5fdc\u30a4\u30e1\u30fc\u30b8\u306e\u4e00\u89a7\u304c\u3042\u308b\u304c\u3001\u6307\u5b9a\u306a\u3057\u3060\u3068buster\u304c\u5165\u308b\u3088\u3046\u3060\u3002<br>buster\u3068\u306f\u306a\u3093\u3060\u3068\u306f\u601d\u3063\u305f\u304c\u3001os-release\u3092\u898b\u305f\u3068\u3053\u308dDebian\u304c\u52d5\u3044\u3066\u3044\u308b\u3089\u3057\u3044\u3002<br>alpine\u3068\u4e26\u5217\u3067\u66f8\u3044\u3066\u3042\u3063\u305f\u306e\u3067\u3001buster\u306frebian\u7cfb\u306edocker\u7279\u5316\u304b\u4f55\u304b\u3068\u3044\u3046\u7406\u89e3\uff08\u4eca\u5ea6\u8abf\u3079\u3088\u3046\uff09<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u3001php:latest-fpm\u306f\u306a\u3044\u307f\u305f\u3044<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cmd&gt; docker run -it --rm php:latest-fpm sh\nUnable to find image 'php:latest-fpm' locally\ndocker: Error response from daemon: manifest for php:latest-fpm not found: manifest unknown: manifest unknown.\nSee 'docker run --help'.<\/pre><\/div>\n\n\n\n<p>php\u306a\u3093\u304b\u306f\u5bb9\u6613\u306b\u5909\u66f4\u3059\u308b\u3082\u306e\u3067\u306f\u306a\u3044\u3068\u306f\u77e5\u3063\u3066\u3044\u308b\u304c\u3001\u3053\u308c\u306f\u3053\u308c\u3067\u3061\u3087\u3063\u3068\u9762\u5012\u304f\u3055\u3044<br>\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u5909\u66f4\u3082\u8ffd\u3063\u3066\u3044\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044<br>\u500b\u4eba\u7684\u306b\u306f\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f\u614e\u91cd\u306b\u3057\u306a\u3051\u308c\u3070\u884c\u3051\u306a\u3044\u304c\u3001\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30ac\u30f3\u30ac\u30f3\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3068\u601d\u3063\u3066\u3044\u308b<br>\u305d\u306e\u305f\u3081\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306a\u306e\u3060\u304b\u3089<\/p>\n\n\n\n<h2>\u307e\u3068\u3081<\/h2>\n\n\n\n<p>win10pro\u3060\u3068docker\u306f\u7c21\u5358\u306b\u5165\u3063\u305f\u3002<br>\u30d6\u30ed\u30b0\u306b\u307e\u3068\u3081\u3089\u308c\u306a\u304b\u3063\u305f\u304cHome\u3060\u3068wsl2\u3092\u3057\u3063\u304b\u308a\u5165\u308c\u3089\u308c\u308c\u3070\u3001\u3053\u3061\u3089\u3082\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u5165\u3063\u305f\u3002<br>\u3042\u308a\u304c\u3068\u3046WSL<br>dockerfile\u306b\u3064\u3044\u3066\u8abf\u3079\u3064\u3064\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u3063\u3066\u3044\u3053\u3046<br>cmake\u3092\u3084\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u7c21\u5358\u3060\u308d\u3046\u304c\u9762\u5012\u304f\u3055\u3044\u3002\u305d\u3093\u306a\u4e88\u60f3\u304c\u3053\u308c\u304b\u3089\u306e\u610f\u6b32\u3092\u524a\u3063\u3066\u3044\u304f\u6c17\u6301\u3061\u304c\u3042\u308b\u3002<br>cmd\u3067\u4f5c\u696d\u3059\u308b\u3068Ctrl+w\u3067\u5358\u8a9e\u524a\u9664\u307f\u305f\u3044\u306a\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u304c\u51fa\u6765\u306a\u3044\u306e\u304c\u30af\u30bd\u9762\u5012\u304f\u3055\u3044<br>\u591a\u5206\u4ed6\u306e\u30ad\u30fc\u306b\u5272\u5f53\u3055\u308c\u3066\u3044\u308b\u3093\u3060\u308d\u3046\u304c\u3001\u8abf\u3079\u308b\u6c17\u529b\u3082\u306a\u304b\u3063\u305f\u3002<br>PowerShell\uff1f\u77e5\u3089\u3093\u3001\u305d\u3093\u306a\u3082\u306e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5965\u3055\u3093\u3001\u3054\u5b58\u77e5\u3067\u3057\u305f\uff1f\u4eca\u306e\u6d41\u884c\u308a\u306f\u30b3\u30f3\u30c6\u30ca\u3089\u3057\u3044\u3093\u3067\u3059\u3063\u3066\u3088\uff01\u96a3\u306e\u5965\u3055\u3093\u3082\u3084\u3063\u3066\u307e\u3059\u308f\u3088\uff01 \u30b3\u30f3\u30c6\u30ca\u304c\u306a\u3093\u306a\u306e\u304b\u77e5\u3063\u3066\u3044\u308b\u3002 \u5b9f\u306fk8s\u3082\u4f7f\u3048\u308b\u3002\u306a\u3093\u306a\u3089k8s\u306e\u304a\u304b\u3052\u3067\u3054\u98ef\u3092\u98df\u3079\u3066\u308b\u307e\u3067\u3042\u308b\u3002\u3067\u3082Docker\u74b0\u5883\u304c\u306a\u3044 &hellip; <a href=\"https:\/\/auto.meto4d.pgw.jp\/blog\/?p=95\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Docker\u74b0\u5883\u3092\u4f5c\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,7,10,6,12],"tags":[],"views":1841,"_links":{"self":[{"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/95"}],"collection":[{"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":15,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/245"}],"wp:attachment":[{"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto.meto4d.pgw.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}