使用docker run时出现以下错误:
[root@vir-centos7 ~]# docker run -p 9001:9000 --name php-fpm -d docker.io/astj/centos5-vault -v /usr/share/nginx/html:/usr/share/nginx/html
206c7d76305268488c934494398f1606029c2f18448e441b380394750519ee33
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"-v\": executable file not found in $PATH".
[root@vir-centos7 ~]#
原因应该是shell环境出错,加上/bin/bash 就可以了(注: php-fpm名字已经使用了,下面使用的是新名字php-fpm1)
[root@vir-centos7 ~]# docker run -p 9001:9000 --name php-fpm1 -d docker.io/astj/centos5-vault /bin/bash -v /usr/share/nginx/html:/usr/share/nginx/html
6261103ce0ce761f4c133d48d37adb7eab8c944ad1591b4dafb2d24193e4ea48
[root@vir-centos7 ~]#