有没有一种在 Windows 命令提示符下运行的方法,一个多行的“docker run”命令,例如而不是
"docker run -v .. --name .. --entrypoint .. <image_name>"
有点像
"docker run
-v. ..
--name ..
--entrypoint ..
<image_name>"
编辑变得很痛苦!谢谢,强尼
编辑:我试过添加 ^ 命令,它不起作用。 “docker run”的错误需要至少 1 个参数。
最佳答案
我认为最好的工具是 docker-compose,它使用 docker-compose.yml 文件来准备运行或构建指令。
因此它将是一个 yml 或 yaml 格式的文本文件,并在准备时引用不同的关键字。
https://docs.docker.com/compose/overview/
Compose is a tool for defining and running multi-container Docker applications.
With Compose, you use a YAML file to configure your application’s services.
Then, with a single command, you create and start all the services from your configuration.
To learn more about all the features of Compose, see the list of features.
关于windows - docker 运行 : multi-line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52440691/