{"id":955,"date":"2019-04-10T10:20:46","date_gmt":"2019-04-10T02:20:46","guid":{"rendered":"http:\/\/jrblog.pentaidea.com\/john\/2019\/04\/10\/run-docker-in-wslwindows-subsystem-linux-of-win10\/"},"modified":"2019-04-10T10:20:46","modified_gmt":"2019-04-10T02:20:46","slug":"run-docker-in-wslwindows-subsystem-linux-of-win10","status":"publish","type":"post","link":"https:\/\/john.pentaidea.com\/?p=955","title":{"rendered":"Run docker in (WSL)Windows Subsystem Linux of Win10"},"content":{"rendered":"<ol>\n<li>\n<p>Install docker in WSL (ref: posts&quot;<a href=\"\/\/\/view\/16323889\/s363\/e7cadb88-4412-46b6-9c9f-117f9cb5a336\/e7cadb88-4412-46b6-9c9f-117f9cb5a336\/87798807-615b-44c3-97ce-a9468dc7afd6\">Quick start to install Docker and Docker-compose on CentOS<\/a>&quot;)<\/p>\n<\/li>\n<li>\n<p>Open &quot;Expose daemon on <a href=\"2375\/\">tcp:\/\/localhost:2375<\/a>&nbsp;without TLS&quot; within &quot;Win10 Docker Desktop&quot;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png\" \/><\/p>\n<\/li>\n<li>\n<p>Run and get into `bash` of WSL.<\/p>\n<\/li>\n<li>\n<p>Run command, and change the docker host to your Win10 via TCP:<\/p>\n<\/li>\n<\/ol>\n<pre><code>vi&nbsp;~\/.bashrc&nbsp;\n\n===&nbsp;.bashrc ===\nexport DOCKER_HOST=&apos;tcp:\/\/0.0.0.0:2375&apos;\n<\/code><\/pre>\n<pre><code>source ~\/.bashrc\n<\/code><\/pre>\n<\/p>\n<p>Ref:&nbsp;<a href=\"https:\/\/stackoverflow.com\/a\/48501091\/3634867\">https:\/\/stackoverflow.com\/a\/48501091\/3634867<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Install docker in WSL (ref: posts&quot;Quick start to install Docker and Docker-compose on CentOS&quot;)<\/p>\n<\/div>","protected":false},"author":1,"featured_media":1009,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[12,24],"class_list":["post-955","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-docker","tag-wsl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/john.pentaidea.com\/?p=955\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Install docker in WSL (ref: posts&quot;Quick start to install Docker and Docker-compose on CentOS&quot;)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/john.pentaidea.com\/?p=955\" \/>\n<meta property=\"og:site_name\" content=\"John&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-10T02:20:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1022\" \/>\n\t<meta property=\"og:image:height\" content=\"530\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"jj\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"jj\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/john.pentaidea.com\/?p=955\",\"url\":\"https:\/\/john.pentaidea.com\/?p=955\",\"name\":\"Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/john.pentaidea.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/john.pentaidea.com\/?p=955#primaryimage\"},\"image\":{\"@id\":\"https:\/\/john.pentaidea.com\/?p=955#primaryimage\"},\"thumbnailUrl\":\"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png\",\"datePublished\":\"2019-04-10T02:20:46+00:00\",\"dateModified\":\"2019-04-10T02:20:46+00:00\",\"author\":{\"@id\":\"https:\/\/john.pentaidea.com\/#\/schema\/person\/3d2e5980a7d3023e93b91d668d2a4a4f\"},\"breadcrumb\":{\"@id\":\"https:\/\/john.pentaidea.com\/?p=955#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/john.pentaidea.com\/?p=955\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/john.pentaidea.com\/?p=955#primaryimage\",\"url\":\"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png\",\"contentUrl\":\"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png\",\"width\":1022,\"height\":530},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/john.pentaidea.com\/?p=955#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/john.pentaidea.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run docker in (WSL)Windows Subsystem Linux of Win10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/john.pentaidea.com\/#website\",\"url\":\"https:\/\/john.pentaidea.com\/\",\"name\":\"John's Blog\",\"description\":\"\u4e16\u754c\u56e0\u601d\u7dd2\u800c\u8907\u96dc, \u4eba\u56e0\u5922\u60f3\u800c\u5049\u5927\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/john.pentaidea.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/john.pentaidea.com\/#\/schema\/person\/3d2e5980a7d3023e93b91d668d2a4a4f\",\"name\":\"jj\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/john.pentaidea.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a685414cd92056415bc823b5cfbbf95a44a98df88d8c040b18613724c1c0724b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a685414cd92056415bc823b5cfbbf95a44a98df88d8c040b18613724c1c0724b?s=96&d=mm&r=g\",\"caption\":\"jj\"},\"sameAs\":[\"https:\/\/john.pentaidea.com\"],\"url\":\"https:\/\/john.pentaidea.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/john.pentaidea.com\/?p=955","og_locale":"en_US","og_type":"article","og_title":"Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog","og_description":"Install docker in WSL (ref: posts&quot;Quick start to install Docker and Docker-compose on CentOS&quot;)","og_url":"https:\/\/john.pentaidea.com\/?p=955","og_site_name":"John&#039;s Blog","article_published_time":"2019-04-10T02:20:46+00:00","og_image":[{"width":1022,"height":530,"url":"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png","type":"image\/png"}],"author":"jj","twitter_card":"summary_large_image","twitter_misc":{"Written by":"jj"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/john.pentaidea.com\/?p=955","url":"https:\/\/john.pentaidea.com\/?p=955","name":"Run docker in (WSL)Windows Subsystem Linux of Win10 - John&#039;s Blog","isPartOf":{"@id":"https:\/\/john.pentaidea.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/john.pentaidea.com\/?p=955#primaryimage"},"image":{"@id":"https:\/\/john.pentaidea.com\/?p=955#primaryimage"},"thumbnailUrl":"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png","datePublished":"2019-04-10T02:20:46+00:00","dateModified":"2019-04-10T02:20:46+00:00","author":{"@id":"https:\/\/john.pentaidea.com\/#\/schema\/person\/3d2e5980a7d3023e93b91d668d2a4a4f"},"breadcrumb":{"@id":"https:\/\/john.pentaidea.com\/?p=955#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/john.pentaidea.com\/?p=955"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/john.pentaidea.com\/?p=955#primaryimage","url":"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png","contentUrl":"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png","width":1022,"height":530},{"@type":"BreadcrumbList","@id":"https:\/\/john.pentaidea.com\/?p=955#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/john.pentaidea.com\/"},{"@type":"ListItem","position":2,"name":"Run docker in (WSL)Windows Subsystem Linux of Win10"}]},{"@type":"WebSite","@id":"https:\/\/john.pentaidea.com\/#website","url":"https:\/\/john.pentaidea.com\/","name":"John's Blog","description":"\u4e16\u754c\u56e0\u601d\u7dd2\u800c\u8907\u96dc, \u4eba\u56e0\u5922\u60f3\u800c\u5049\u5927","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/john.pentaidea.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/john.pentaidea.com\/#\/schema\/person\/3d2e5980a7d3023e93b91d668d2a4a4f","name":"jj","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/john.pentaidea.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a685414cd92056415bc823b5cfbbf95a44a98df88d8c040b18613724c1c0724b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a685414cd92056415bc823b5cfbbf95a44a98df88d8c040b18613724c1c0724b?s=96&d=mm&r=g","caption":"jj"},"sameAs":["https:\/\/john.pentaidea.com"],"url":"https:\/\/john.pentaidea.com\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/john.pentaidea.com\/wp-content\/uploads\/2019\/05\/62333e940e8c1575bdf17bc615fce30e.png","_links":{"self":[{"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/posts\/955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=955"}],"version-history":[{"count":0,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/posts\/955\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=\/wp\/v2\/media\/1009"}],"wp:attachment":[{"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/john.pentaidea.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}