Using the `docker run -v x:/y` option, is it possible to delete files on the host system from the docker container?
Yes definitely. If you use -v you can give the container full root access to the host system (using the dir) and it can delete away. Thats why when you need to pass system-directories to a container it is rmended to use ro like -v This prevents any writes to the directory.
On Windows, should Docker be run inside a Linux VM or natively with Hyper-V?
On Windows on the instance Linux runs inside a Hyper-V VM (virtual machine). This can either be good stuff or bad stuff clarifying your needs. Docker Linux VM on Windows can run in your Windows environment by itself. This is because Docker supports all major OS Windows Mac OS Linux And it actually has different instructions for install. Docker is the underlying engine that helps with the kernel virtualization. It runs on various platforms and allows Devs and System Admins to run containerized applications in a simple way. They are like VMs except the fact that theyre not isolated. Your first steps with docker will likely be the installation so you need to Learn about Docker s in the proper way. Operating systems such as MacOS or Windows 1 are providing you a simple Docker for download while with Linux you would want to use your install package manager and the ongoing maintenance will be much easier this way. It is entirely possible to run Docker in a VM. Docker is a light virtualization solution it doesn't virtualize hardware so you won't be affected by problems typical for nested VMs. When ties to a virtual machine valuable resources are copied for the guest OS and the hypervisor. This makes it viable to run many instances of one or more OSs. Otherwise Docker containers s are executed with the Docker engine rather than the hypervisor.
What is the overhead to have docker containers Running on top of Vmware and hyper-v hypervisors hosts?
At UberCloud we run containers on bare metal and virtual environments on a day to day basis forpute intensive tasks such as simulations. We find that the benefits of using containers outweigh the overhead significantly. To be more specific as Gustavo mentioned there is an overhead of running networking through Docker run time environment which adds another NAT (network address translation) to every connection. So if your application is sensitive to such network related overhead look into --net=host (which means Docker doesn't NAT your connections and leaves all connection request to the host to manage. We don't find significant overhead with disk IO memory access even specialized networking such as Infiniband connections. In most cases the overhead we observe for various operations such as MPI benchmarks as well as heavyputation tasks are negligible. In summary if you are on a VM (and already paid the latency penalty) you shouldn't worry at all when using Docker Containers on top of the VM which will introduce only a fraction of additional latency. Your question may have a different intention; you may be asking what is the overhead when running a Docker Container on bare metal vs running the same Docker Container on a hypervisor. If that's the case please be a bit more specific about your workload since the overhead the hypervisor will introduce will heavily depend on the use case. Needless to say we find that for many of our workloads Docker Containers perform better on bare metal vs on hypervisors.
What are pros and cons to have docker containers Running on vSphere or Hyper-V hypervisors compared to Kubernetes or Mesos?
Kubernetes and Mesos are schedulers -- they execute workloads across a collection of hosts (physical or virtual servers). The hosts can be running VMware vSphere or Microsoft Hyper-V or simply be bare metal running Linux. Kubernetes requires a container technology like Docker or rkt to run containers on top of VMs or Linux. Mesos can schedule containers VMs or on bare metal running Linux. There are no pros and cons because they do different things. You can't virtualize an x86 server without vSphere or Hyper-V or other hypervisor. Kubernetes and Mesos schedule VMs and containers.
How can docker container access a docker machine socket?
First to clarify Docker machine s is amand-line tool that allows one to install and manage Docker hosts on a collection of different virtual machines or IaaS providers. Im pretty sure there no exposed socket with docker machine. Docker engine s (which I think is what youre asking about) is a container runtime capable of running container -spec . To allow control via the dockermand line interface or via another utility or orchestration system Docker engine can acceptmands either from a file- or network-based socket. By default it listens to a socket at As mentioned you can mount this socket inside the container by doing something like docker run -v -ti --rm centos bash code This would instruct the Docker engine to fetch the latest CentOS image (if it isn already downloaded) mount the docker socket in the container at (Im using different name to ex the argument structure) and run a bash shell in that container that you can interact with removing the container once you exit the shell. All this said I strongly caution against doing something like this. The intention for the Docker socket is to be used in a safe protected way; The socket code itself does not have much security built into it (to date). Because of this any security weakness in the container that has mounted the socket may allow a malicious actor topromise not just the kernel but the whole Docker node. For more info take a look at Don't expose the Docker socket (not even to a container) s
How do I copy files into a docker container?
You may not want to. The files in question will not change If you copy the files into the container they are immutable. This would be a good idea if for example it is a configuration for some sort of server (tomcat nginx mysql etc). The files in question should change over time In this case you should consider mounting the files into the container at runtime. In this way you will later be able to mount them with another container. For example if you are working with PHP and want to be able to alter the code without changing the runtime configuration you could put the code on the host at and mount the directory in in the container. Then any code change is immediately reflected in the run time. Key Distinction The key point here is to know the difference between container build time and container run time and what that means for persistence.
How do I resolve the error "The virtual machine management service failed to start the virtual machine DockerDesktopVM because one of the Hyper-V component is not running " in Docker desktop?
Do you have Virtualization enabled in CMOS? Do you have Virtualization enabled in Services? Those are the two leading reasons why it fails to initialize in any VM Software.