问题
I want to run a set of docker containers but with a custom kernel.
Since Docker for Windows is already using Hyper-V, could it be possible to change which image is running?
回答1:
I'm not familiar with Windows. But the Kernel that your VM is running is the Kernel that is used for all your Docker containers. So, my naive guess would be, changing the VM's Kernel would work.
I'm assuming Hyper-V is the hypervisor. That would create a VM (running a Linux Kernel) on top of which the Docker containers are running.
回答2:
Docker uses its own patched Kernel (along with a specialized Linux distro) called linuxkit in Docker Desktop. It is mentioned in https://hub.docker.com/r/docker/for-desktop-kernel.
I am able to find kernel
, initrd.img
and cmdline
in a folder called linuxkit
inside the application folder of my Docker for Mac installation.
I assume that you will find a similar folder inside the Windows installation.
Simply build your own Kernel with the instructions/patches of linuxkit
and replace those files.
回答3:
I would also love to get answer for this question...
I would like to use "Docker Desktop for Windows" and it uses Linux Kernel 4.9.184 but I would like to use Kernel Version 3.10.0-1062. I want to use older Kernel because it is the Kernel for Red Hat Enterprise Linux 7.
Link for Docker Desktop Community Linux Kernel version https://docs.docker.com/docker-for-windows/release-notes/
Link for Red Hat Enterprise Linux 7 Kernel Version https://access.redhat.com/articles/3078#RHEL7
来源:https://stackoverflow.com/questions/54708169/can-i-change-the-kernel-used-in-docker-for-windows