From fa3d77299eeeda89d80e271a30e6b491adb7705a Mon Sep 17 00:00:00 2001 From: jekkos Date: Sun, 31 Jan 2016 15:24:42 +0100 Subject: [PATCH] Use curl to wait for apache start (#305) --- .travis.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c85fe0f7..ff00e26be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ before_install: - docker run -d jekkos/opensourcepos script: - - docker exec -t -i $(docker ps | tail -n 1 | cut -d' ' -f1) /bin/sh -c "wget --retry-connrefused --tries=5 -q --waitretry=3 --spider http://localhost/index.php && cd /app && grunt mochaWebdriver:test" + - docker exec -t -i $(docker ps | tail -n 1 | cut -d' ' -f1) /bin/sh -c "while ! curl http://localhost/index.php; do sleep 1; done; cd app && grunt mochaWebdriver:test" diff --git a/Dockerfile b/Dockerfile index b739ecd69..23df9b96f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:trusty MAINTAINER jekkos RUN apt-get update RUN apt-get -y upgrade -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd nodejs npm wget +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd nodejs npm curl RUN easy_install supervisor ADD ./docker/foreground.sh /etc/apache2/foreground.sh ADD ./docker/supervisord.conf /etc/supervisord.conf