From cb30cce66128f3f45c592a2eee86dbf0c1325cb1 Mon Sep 17 00:00:00 2001 From: will Farrell Date: Wed, 22 Feb 2017 15:44:36 -0700 Subject: [PATCH] add healthcheck --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1adbc4f..dbed3e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,7 @@ FROM alpine:3.5 COPY ping / -CMD ["sh", "ping"] \ No newline at end of file + +HEALTHCHECK --interval=5s --timeout=3s \ + CMD ps aux | grep '[s]h ping' || exit 1 + +CMD ["sh", "ping"]