did not find expected key

持续集成时报错:yaml: line 18: did not find expected key

2018年11月06日 11:35:10 东坡子 阅读数 4967

在学习持续集成开发时,镜像打包报错:yaml: line 18: did not find expected key

看了一下并不是什么key的问题,真正的原因是空格不对
tags:
  - latest
  dockerfile: Dockerfile
这是改错之前的,网上百度了一下,有人说是空格的问题,我就返回来看自己的,发现dockerfile多空了两个格,实际上dockerfile和tags是同一级别的
我将空格去掉
tags:
  - latest
dockerfile: Dockerfile
然后就成功了

转载于:https://my.oschina.net/u/3367404/blog/3081021

你可能感兴趣的:(did not find expected key)