docker wsl ubantu 18安装 转

Posted nhz-m

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker wsl ubantu 18安装 转相关的知识,希望对你有一定的参考价值。

原博客地址  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安装 转的主要内容,如果未能解决你的问题,请参考以下文章

Ubantu18.04安装WPS

G++-7windows10下Ubuntu子系统(WSL)安装g++及初步使用,docker使用g++

G++-7windows10下Ubuntu子系统(WSL)安装g++及初步使用,docker使用g++

ubantu下git的安装和配置(转)

wsl 安装 docker 并且使用 centos 镜像

Windows安装WSL2和docker