gpt4 book ai didi

docker - 运行撰写yml文件docker-compose.yml的Docker堆栈部署命令错误

转载 作者:行者123 更新时间:2023-12-02 20:02:25 25 4
gpt4 key购买 nike

[root@d1 docker]# docker stack deploy -c docker-compose.yml getstartedlab
yaml: line 12: did not find expected key

Here is the docker yml file I am using please see the docker-compose.yml file below listed



version: "3"
services:
web:
image: pragneshpanchal/httpdsrv
deploy:
replicas: 5
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition:on-failure
ports:
- "4000:80"
networks:
- webnet
networks:
webnet:

最佳答案

您缺少condition:on-failure之间的空格。请添加一个空格,看看是否可行。

关于docker - 运行撰写yml文件docker-compose.yml的Docker堆栈部署命令错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52490287/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com