在compose.yml里的代码是
healthcheck:
test: ["CMD", "curl", "-fs", "http://localhost:2345","||","exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
然后运行起来之后状态一直是unhealthy,用inspect指令查看
然而进到容器内执行
curl -fs http://localhost:2345 然后 echo $? 得到的是0
为什么会ExitCode是3的?哪位大神解答一下?