https://github.com/docker/for-mac/issues/3677 mac 版本的 docker,只处于能用的阶段。。。文件读写太差了
---------------------------------------------------------------------------
$ docker run --rm -it -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real 0m 0.37s
user 0m 0.03s
sys 0m 0.31s
---------------------------------------------------------------------------
$ docker run --rm -it -v "$(PWD):/pwd:delegated" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real 0m 31.82s
user 0m 0.34s
sys 0m 3.04s
---------------------------------------------------------------------------
$ docker run --rm -it -v "$(PWD):/pwd:cached" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real 0m 34.16s
user 0m 0.21s
sys 0m 3.78s
---------------------------------------------------------------------------
https://github.com/docker/for-mac/issues/3677#issuecomment-6048405568sec on a RaspberryPi
vs
50sec on a Macbook Pro
Dump your macbooks and start carrying a RPi.