码迷,mamicode.com
首页 > 其他好文 > 详细

docker wsl ubantu 18安装 转

时间:2019-06-18 14:21:06      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:http   actual   rip   power   lsb   extra   cat   alias   started   

原博客地址  https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly

1. Install Docker on Windows

To install the Docker engine on Windows, just go to docker.com and download the appropriate distribution. Also, make sure hardware virtualization is enabled and Hyper-V is installed, lest the engine won’t start.

Shortcut: Install Windows 10 Creators Update

With Windows 10 Creators Update, accomplishing all of this has become a lot simpler, since it allows you to run Windows executables from Bash. Just add these two lines to your .bashrc (and reload your environment) and you’re done!

You can now run docker --version from Bash, and you don’t even have to read the rest of this blog post :)

Making it work on Windows 10 Anniversary Edition

To install Docker on the WSL, you’ll need to jump through a few more hoops. There’s a description for Ubuntu in general here, which works for the WSL as well, with the exceptions of some of the optional steps. Here’s what I did:

Of course, there’s also the option of downloading and extracting the binaries we’ll need, and put them somewhere in your PATH. There are instructions here for how to get the latest version.

Where did that get us?

We now actually have the Docker engine installed on both Windows and the WSL, but it isn’t started on either. The Windows installer helpfully created a Docker shortcut on the desktop and/or in the Start menu – use that to start the Docker engine. Then, you can try running e.g. docker images from PowerShell and from Bash:

PowerShell:

We haven’t created any images yet, so that’s fine.

docker wsl ubantu 18安装 转

标签:http   actual   rip   power   lsb   extra   cat   alias   started   

原文地址:https://www.cnblogs.com/nhz-M/p/11044665.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!