Docker之rm: Device or resource busy

docker container rm -rf / data

prompt:

rm: cannot remove ‘/data’: Device or resource busy

the reason:

In the establishment of a container made to mount the appropriate directory, no unloading, so Device or resource busy

 

You must first uninstall umount / data

Delete rm -rf / var / lib / docke

但是在容器直接umount会报u出现:umount: /mypath: must be superuser to unmount
Need to give permission, you can access the device

docker run -it  加上 --privileged  
进入后在 umount /data
在删除rm -rf /var/lib/docke

Guess you like

Origin www.cnblogs.com/awakenedy/p/11280541.html