ubuntu - Can docker write to a cd? -
can docker write cd? can docker execute
cdrecord dev=/dev/sr0 -checkdrive from ubuntu container?
docker seems able use parent's network hardware, why can't use parents cdrom/dvd device?
update:
this question programming in have shell script run on ubuntu vm , want know if feasible migrate docker. apologize not pointing out :)
i suppose (not tested yet), can find example in docker run script:
docker run \ -t --rm \ --privileged \ -v $xsock:$xsock \ -v /etc/localtime:/etc/localtime:ro \ -v /dev/sr0:/dev/sr0 \ -v /dev/cdrom:/dev/cdrom \ -v $rips:/rips \ --name handbrake marvambass/handbrake & as mentioned in comments luca, --privileged flag required (docker run):
by default, potentially dangerous kernel capabilities dropped; including
cap_sys_admin(which required mount filesystems). however,--privilegedflag allow run.the
--privilegedflag gives all capabilities container, , lifts limitations enforced devicecgroupcontroller.
in other words, container can host can do.
flag exists allow special use-cases, running docker within docker.
as vincent demeester mentions in comments, there --device option:
it necessary directly expose devices container.
--deviceoption enables that.
example, specific block storage device or loop device or audio device can added otherwise unprivileged container (without--privilegedflag) , have application directly access it.by default, container able read, write ,
mknodthese devices. can overridden using third:rwmset of options each--deviceflagnote:
--devicecannot safely used ephemeral devices. block devices may removed should not added untrusted containers--device.
as seen in issue 10637, devices can change node names. see issue 8826
if launch docker daemon
lxcbackend, should able use--lxc-conf=lxc.cgroup.devices.allow = c 189:* rwmallow container access devices of group, , usevolume -v /dev/bus/usb/:/dev/bus/usb/access all usb devices.
Comments
Post a Comment