alexev275
(Alexev275)
November 15, 2020, 11:53pm
1
I have mounted CDROM to my docker host
sudo mount /dev/cdrom /media/cdrom
then create volume
sudo docker volume create --name cdrom
and now I want to start container with my cdrom
sudo docker run -it centos cdrom:/media/cdrom
but receive
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused “exec: “cdrom:/media/cdrom”: stat cdrom:/media/cdrom: no such file or directory”: unknown.
What I doing wrong? Thanks.
seimsel
(Seimsel)
November 16, 2020, 11:27am
2
I think this should work:
sudo docker run -v /media/cdrom:/media/cdrom -it centos
But maybe you need:
sudo docker run --device /dev/cdrom -it centos
You definitively don’t need a named volume (volume create)
alexev275
(Alexev275)
November 16, 2020, 8:19pm
3
Thank you, seimsel first one working if device is mounted
seimsel
(Seimsel)
November 17, 2020, 5:34am
5
Perfect. I think the second one might work if the device is not mounted. You would need to mount it inside the container in that case.