Docker container: mount plugged devices on Windows
NickName:Alexey Orlov Ask DateTime:2022-01-07T22:04:00

Docker container: mount plugged devices on Windows

Running a container on Linux:

$ docker run -it --name damastes --rm --mount type=bind,source="$HOME"/,target=/enjoy --mount type=bind,source=/run/media,target=/run/media,bind-propagation=shared -w /enjoy damastes:latest

docker-compose.yml:

services:
  damastes:
    image: damastes:latest
    volumes:
      - type: bind
        source: $HOME
        target: /enjoy
      - type: bind
        source: /run/media
        target: /run/media
        bind:
          propagation: shared
    working_dir: /enjoy

Can't even start to guess how the second mount should look on Windows.

Copyright Notice:Content Author:「Alexey Orlov」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70622370/docker-container-mount-plugged-devices-on-windows

More about “Docker container: mount plugged devices on Windows” related questions

Docker container: mount plugged devices on Windows

Running a container on Linux: $ docker run -it --name damastes --rm --mount type=bind,source="$HOME"/,target=/enjoy --mount type=bind,source=/run/media,target=/run/media,bind-propagation=...

Show Detail

How to mount an FTDI USB device to a docker container?

I would like to be able to access an FTDI serial-to-usb bridge device plugged into a host computer from within a Docker container. From there, I am using a Python script with the pyusb and libusb

Show Detail

Mount DFS to Docker container in Windows 10

I have a DFS network drive that I would like to mount to my docker container in Windows 10. But I cannot make it work using any of the "half" suggestions on Google. # First try docker run -v \\my\

Show Detail

Docker volume mount windows container

I am getting the following error while trying to mount a volume in windows docker container. =============== C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon:

Show Detail

Docker: Mount volume on Windows host - Windows Container

I seem to be running the least supported combination of docker. Im running on a windows host machine and a windows container. I want to mount C:\temp -> C:\temp I have tried docker run ... -v C:...

Show Detail

Mount Windows network drive in Docker container (Linux)

I am trying to mount Windows shared drive into Linux. I also want it to be in the docker container, so would like to add few commands in Dockerfile. (Then, it will mount whenever container is creat...

Show Detail

How to mount a Windows path volume inside a Docker container

It's OK when I use docker run --rm -v C:\Python39:/mnt --entrypoint ls alpine -la /mnt to mount a Windows path into a container in a native Windows shell. But when I mount Windows //var/run/docker....

Show Detail

How to mount a NFS file share inside a Windows Docker Container

I am running Docker on a Windows Server 2022. I need to start a Windows Container - must be a windows container because I am porting a Net Framework App that cannot run on Linux. My Windows Container

Show Detail

How to mount USB to Linux Docker Container from Windows Host

I've set up a Docker container running Linux from my Windows Host. Now I need to use a USB2CAN Dongle in my Docker container. How do I mount the USB device to the Docker container? Thanks in advance!

Show Detail

Docker Compose mount Windows folder

I am using Docker Toolbox in Windows and am trying to mount a Windows folder in a docker-compose.yml file like this: nginx: image: nginx:latest container_name: test_server ports: - "80:8...

Show Detail