Temporarily, I use -v
param like /rootfs/shared_dir:/docker/docker_file
.
My container create some data file in the folder, And I want share the folder with my system.
Also I want to limit the IO speed in the docker container. How can I do this?
After version 1.10 docker added new features to manipulate IO speed in the container.
for example if you want to limit write speed to 50 MB/s
without limit my speed is 291 MB/s
In my case, I'm using Centos7 with docker named volume,
First
find the device name belongs to the container you wanna limit.
Than get something like
Second
then you will get something like
the number of dm-x depends on how many containers you are running.find the dm-x that match your container device name number.
Then you can just did what @stambata said: