From a7c9be6fc31158c14923b2c24a15c76498a0fa4f Mon Sep 17 00:00:00 2001 From: Andrejs Cunskis Date: Mon, 15 May 2017 14:28:52 +0300 Subject: [PATCH] Container health check based on Android Emulator boot completion --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8952477..66fa93d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -175,4 +175,8 @@ COPY devices /root/devices COPY src /root/src COPY supervisord.conf /root/ RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf + +HEALTHCHECK --interval=2s --timeout=35s --retries=1 \ + CMD adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done' + CMD /usr/bin/supervisord --configuration supervisord.conf