Docker-compose up时报错:
Posted pp8080
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Docker-compose up时报错:相关的知识,希望对你有一定的参考价值。
Docker-compose up时报错:
ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in "./docker-compose.yml", line 2, column 9
解决
出现这个错误的是因为yaml格式不正确,谷歌定义的yaml格式太严格了,每个冒号后面都必须带有空格
错误
version:"3"
services:
web:
image: licerlee/friendlyhello:v1
deploy:
replicas:5
resources:
limits:
cpus:"0.1"
memory:50M
restart_policy:
condition: on-failure
ports:
- "80:80"
networks:
- webnet
networks:
webnet:
正确
version: "3"
services:
web:
image: licerlee/friendlyhello:v1
deploy:
replicas: 5
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition: on-failure
ports:
- "80:80"
networks:
- webnet
networks:
webnet:
以上是关于Docker-compose up时报错:的主要内容,如果未能解决你的问题,请参考以下文章
svn更新时报错Please execute the 'Cleanup' command.+乱码 ,clean up失败,求大神~
git clone时报错 提示 early EOF、The remote end hung up unexpectedly 、 index-pack failed等错误信息
look up error: undefined symbol:......解决过程
使用`docker-compose run`时无法调试,但`docker-compose up`有效