如何每 60 秒重新启动容器服务我尝试睡眠,但它对我不起作用:
spark:
image: jaegertracing/spark-dependencies
environment:
- STORAGE=elasticsearch
- ES_NODES=http://localhost:9200
command: [ /bin/bash -c sleep 20 ]
restart: always
networks:
- elastic-jaeger
Run Code Online (Sandbox Code Playgroud)
小智 5
你可以结合使用健康检查restart: always
healthcheck:
test: curl -sS http://127.0.0.1 || exit 1
interval: 5s
timeout: 10s
retries: 3
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
18830 次 |
最近记录: |