本文主要是介绍not shared from the host and is not known to Docker,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题内容
docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -d -p 9200:9200 -p 9300:9300 -v ${ES_SINGLE}/config/es-single.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v ${ES_SINGLE}/data:/usr/share/elasticsearch/data --name st_es elasticsearch:7.14.2
ab5c7ba2e09062d54f22b7de6e0c444acfa3e5413ed5abe911eb2b96d61d0358
docker: Error response from daemon: Mounts denied:
The path /opt/workspace/work/es/single/config/es-single.yml is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/desktop/mac for more info.
问题解决:
在Docker中添加文件共享,具体操作如下图所示
这篇关于not shared from the host and is not known to Docker的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!