简体   繁体   English

Windows 上带有 Docker 的 Linux 内核与 WSL Linux 内核不匹配

[英]Linux Kernel with Docker on Windows doesn't match WSL Linux Kernel

I'm trying to mount Azure Files with this tutorial but I'm having trouble mounting.我正在尝试使用本教程安装 Azure 文件,但安装时遇到问题。 I'm using Docker Desktop to develop deployment containers and the tutorial says it requires Linux Kernel >=4.11.我正在使用 Docker Desktop 来开发部署容器,教程说它需要 Linux Kernel >=4.11。 Despite WSL/Ubuntu having kernel 4.19, when I run my Docker containers, the kernel shows up as 4.9.184-linuxkit when I run uname -r .尽管 WSL/Ubuntu 具有内核 4.19,但当我运行 Docker 容器时,内核在运行uname -r时显示为4.9.184-linuxkit I thought that Debian:buster used a newer kernel, so I'm not sure why my kernel is out of date in the containers.我认为 Debian:buster 使用了更新的内核,所以我不确定为什么我的内核在容器中已经过时了。 I updated to WSL2, but that didn't seem to help.我更新到 WSL2,但这似乎没有帮助。

Edit: Found something about Docker Desktop and WSL2 , but I'm not sure what it means.编辑:找到了一些关于Docker Desktop 和 WSL2 的信息,但我不确定这意味着什么。

I was able to get the Docker container linux kernel to match Windows by doing the following:通过执行以下操作,我能够使 Docker 容器 linux 内核与 Windows 匹配:

  1. Enroll in Windows Insider Program and choose the Fast channel注册 Windows 预览体验计划并选择快速通道
  2. Install/enable WSL 2安装/启用 WSL 2
  3. Upgrade to the Edge channel in Docker Desktop for Windows升级到 Docker Desktop for Windows 中的 Edge 通道
  4. Enable WSL integration Docker Desktop -> Settings -> Resources -> WSL Integration启用 WSL 集成 Docker 桌面 -> 设置 -> 资源 -> WSL 集成
  5. Verify with docker run -it debain:buster /bin/bash and uname -r使用docker run -it debain:buster /bin/bashuname -r

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM