Use curl to wait for apache start (#305)

This commit is contained in:
jekkos
2016-01-31 15:24:42 +01:00
parent 67d9ca1e41
commit fa3d77299e
2 changed files with 2 additions and 2 deletions

View File

@@ -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"

View File

@@ -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