Closed carcoonzyk closed 1 year ago
如题,命令行输入docker compose up返回错误: yaml: line 15: did not find expected ',' or ']' line 15: healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:8080/api/health-check | jq -e '.status == "ok"' || exit 1"] interval: 30s timeout: 10s retries: 3
healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:8080/api/health-check | jq -e '.status == "ok"' || exit 1"] interval: 30s timeout: 10s retries: 3
检查你的空格缩进是不是有问题
检查你的空格缩进是不是有问题 我只是将原来的docker-compose.yaml文件中注释的符号‘#’ 去除
检查你的空格缩进是不是有问题 已解决: 将原本docker-compose.yaml中 status == "ok" 把双引号改为单引号,即 status == 'ok' 得以通过
status == "ok"
status == 'ok'
如题,命令行输入docker compose up返回错误: yaml: line 15: did not find expected ',' or ']' line 15:
healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:8080/api/health-check | jq -e '.status == "ok"' || exit 1"] interval: 30s timeout: 10s retries: 3