“ docker container run”需要至少1个参数 [英] "docker container run" requires at least 1 argument
本文介绍了“ docker container run”需要至少1个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用已经创建的卷创建容器,但是控制台显示错误
I'm trying to create a container using a volume that I have already created, but my console shows the error
docker container run 至少需要1个参数
这是我要运行的命令:
docker container run --name db -v volume-dados-do-banco:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=Mypass
我也尝试了这个,还有更多参数,但是仍然存在相同的错误:
I have also tried this one, wih more arguments, but the same error persists:
docker container run -d --name db -p 3306:3306 -e 'ACCEPT_EULA=Y' -e MYSQL_ROOT_PASSWORD=Mypass -v volume-dados-do-banco:/var/lib/mysql
有人对这种情况的发生有任何想法吗?
Any thoughts on the reason why this is happening?
推荐答案
我刚刚重新启动docker并运行:
I just restarted docker and runned:
docker run --name torgmysqldb --volumes-from volume-dados-banco-mysql -e MYSQL_ROOT_PASSWORD=Mypass -p 3307:3306 mysql
I发现了以下已知问题:
https://github.com/ docker / for-win / issues / 2722
I found out a known issue about this: https://github.com/docker/for-win/issues/2722
这篇关于“ docker container run”需要至少1个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文