0
curl無法調用API時,如何重新啓動服務器的docker容器? 我準備了這樣的docker-compose.yml文件。如何在docker-compose中使用健康檢查重新啓動容器?
server:
build: server
command:
- run
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ && echo 'cool, it works'"]
interval: 5s
timeout: 5s
retries: 3
謝謝!!!!!