I believe this was possible via VirtualBox when using Docker Toolbox, and the privileged flag on the container, but I'm not certain if Hyper-V controlled Docker host can support this. I am ultimately attempting to access a microcontroller programmer via the USB device.
Does Docker for Windows with Hyper-V support this?
Update: so far it seems like there are only expensive vendor supplied hardware solutions for this as the possible options for Hyper-V virtual hardware is limited to SCSI drives and optical media.
Related
I have installed Docker on Windows10 to work with single-node Hadoop cluster and enabled Hyper-V feature for it. Now I don't need it, but I don't want to drop docker containers. Can I disable Hyper-V feature for some time and enable it, when I need to work with docker again? Or it might somehow affect existing containers?
Docker is heavily built on deep Linux kernel features which Windows does not support (such as cgroups and namespaces) which is why Docker on Windows 10 can use one of 2 backends:
Hyper-V or WSL2 which in turn is also based on Hyper-V.
It is possible, although not recommended to setup a Windows container on a Windows host without using Hyper-V basing on windows process isolation. This seems to be irrelevant to your case as you ask about Hadoop cluster which seems to be supported only on linux.
So it seems that even if you manage to setup docker to work without Hyper-V, setting up an Hadoop cluster will be impossible.
What is you concern? Is it about performance? Why would you like to turn Hyper-V off?
I am recently learning to use cuda programming and want to use nvidia's tool Nvidia nsight systems to visualize the programs I have written. I have done profile analysis on my personal laptop remotely to the server. Now I have installed cuda on my own laptop with nsight systems software. When I remotely go to the server, he can work. And will display the running timeline. But my program is written in the docker container, when I use nsight systems to link docker, it will fail. Why is this? I mapped my docker to 5222 on the host port. And ensure that the docker container can be directly connected through ssh.
The operating system of the notebook is ubuntu16.04
The operating system of the server is ubuntu16.04
The docker image I use is: nvcr.io/nvidia/tensorrt:20.03-py3
it show that: tool library installation failed!
OK, i solve the problem by nvidia doc,if we want to use nvidia nsight remote to docker, we should Open ports 22 and 45555 by mapping the 22 port of the container to any port of the host, and mapping any port of the container to 45555 of the host.
Does Docker require Hyper-V enabled in windows? If yes, why?
What is the role of Hyper-V in this case?
I m using Windows 10 home. What is the alternative for hyper-V to install Docker pls?
If you use windows10 professional & your bios supports hardware virtualization, suggest you to enable Hyper-V.
When run linux container in windows10, in fact, it still needs a linux system as a docker host, because linux container cannot share kernel with windows.
If enable hyper-v, docker-windows will auto setup a MobyLinuxVm in hyper-v as a virtual machine which act as the host machine of docker. Compared to traditional solution, I mean install a linux in virtualbox. Hyper-v has much better performance, because it does not depend on windows os, it something like setup based on hardware just like vmware-esx.
Finally, if you use home version of windows10, you had to install a virtualbox as the host machine of docker and use docker toolbox, details refers to https://docs.docker.com/toolbox/overview/ for legacy desktop solution.
Update some additional points you may want to know:
a) linux container:
Docker container had to share kernel with host, there are no linux kernel on windows, so for all situations, you had to have a virtual machine with linux as docker host, either hyper-v or virtualbox if no hyper-v support.
b) windows container:
In theory, windows container could share the kernel of windows, so no virtual machine needed.
But microsoft support container too late compared to linux, so for different host, it use different solutions, see next chapter from microsoft web site:
Windows Containers include two different container types, or runtimes.
Windows Server Containers – provide application isolation through process and namespace isolation technology. A Windows Server Container shares a kernel with the container host and all containers running on the host. These containers do not provide a hostile security boundary and should not be used to isolate untrusted code. Because of the shared kernel space, these containers require the same kernel version and configuration.
Hyper-V Isolation – expands on the isolation provided by Windows Server Containers by running each container in a highly optimized virtual machine. In this configuration, the kernel of the container host is not shared with other containers on the same host. These containers are designed for hostile multitenant hosting with the same security assurances of a virtual machine. Since these containers do not share the kernel with the host or other containers on the host, they can run kernels with different versions and configurations (with in supported versions) - for example all Windows containers on Windows 10 use Hyper-V isolation to utilize the Windows Server kernel version and configuration.
There is a github project VRouter which make Openwrt image as an vbox on macOS and routing the traffic to the NIC of the virtual machine as a transparent proxy. I would like to know that is it possible to do these things o with docker?
As fas as I know, docker for mac actually run inside a virtual machine on mac and there is no docker0 NIC on macOS. I found a project tuntaposx and a tuntap support shim installer for Docker for Mac docker-tuntap-osx which make it access docker container inside the virtual machine from macOS instead of publish ports possible. But What's the next step? I am quite confused about network issue. Can someone give me a hint about it?
Docker requires a Linux host to run. It's unlikely it will ever directly support MacOS, or Windows, without some kind of VM running.
Docker isn't a virtual machine. It uses various features of the Linux kernel to essentially simulate a virtual server, but it isn't actually doing full virtualization.
Is it possible to access a USB device (which is not a memory stick) in a Docker container?
I've come across the --—privileged and --device options which I guess would work if I had a Linux host, but they don't seem to work in macOS where USB devices don't show up in /dev.
It looks like docker-machine + VirtualBox is the way to go. I documented the steps I took in the blog post How to use a USB device in a Docker container on Mac.