0

I have CentOS host and CentOS docker container. I have mounted an external volume in CentOs host. I want to mount this external volume inside of CentOS docker container.

I have tried the following command:

mount -t ext4 /dev/sdf /usr/local/share/ext-vol-share for mounting external volume

docker run --name=AppServer -it -v /usr/local/share/ext-vol-share:/opt/share/uploads myname/compname:0.5-Appcontainer /bin/bash

It takes me inside the docker container. But, it does not show the external volume mount inside the container.

Do I need to do anything additional to achieve this? Please help.

Thanks

Alexander Ciesielski
  • 10,506
  • 5
  • 45
  • 66
Rhenatasr
  • 1
  • 1

1 Answers1

0

You need to restart the docker daemon when you add a new storage device.

Also, make sure you've added your device into fstab before you restart.

jaxxstorm
  • 12,422
  • 5
  • 57
  • 67