Docker容器技术

60课时
900学过
5分

课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
2分钟

18 HEALTHCHECK

功能:健康性状态检查

The options that can appear before CMD are:

–interval=DURATION (default: 30s) 每隔30秒探测一次

–timeout=DURATION (default: 30s) 服务器的超时时长

–start-period=DURATION (default: 0s) 初始化多少秒后再探测

–retries=N (default: 3) 探测几次

The command’s exit status indicates the health status of the container. The possible

values are:

0: success – the container is healthy and ready for use (表示成功)

1: unhealthy – the container is not working correctly (表示失败)

2: reserved – do not use this exit code

示例:

vim Dockerfile