File tree Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,10 @@ WORKDIR /var/www/html
113113
114114EXPOSE 22 80 3306 9200
115115
116+ ENV CONTAINER_TIMEOUT=1h
117+
116118ENTRYPOINT ["/sbin/multirun" ]
117119
118- CMD ["/usr/sbin/start-elasticsearch" , "/usr/sbin/start-mysql" ]
120+ CMD ["/usr/sbin/start-elasticsearch" , "/usr/sbin/start-mysql" , "/usr/bin/container-timeout" ]
119121
120122HEALTHCHECK --timeout=10s --interval=10s --start-period=10s CMD /usr/bin/healthcheck
Original file line number Diff line number Diff line change 77
88Please see the docker hub repo page [ mageops/magento-run-tests] ( https://hub.docker.com/r/mageops/magento-run-tests ) .
99
10+ # Container timeout
11+ Container will by default exit after 1h to prevent dangling container in CI environments,
12+ you can adjust this behavior by changing setting different ` CONTAINER_TIMEOUT ` environment variable.
13+ Setting ` CONTAINER_TIMEOUT ` to ` no ` will disable that behavior completely.
14+
1015## Docker tags and software versions
1116
1217The ` master ` branch uses Maria DB 10.2, Elasticsearch 6 and PHP 7.2 which are the latest versions supported by Magento.
Original file line number Diff line number Diff line change 11version : " 2.3"
22services :
33 tests :
4- image : magesuite/run-tests:stable
4+ build : .
55 environment :
66 - DB_USER=magento2
77 - DB_PASS=magento2
88 - DB_NAME=magento2_integration_tests
9+ - CONTAINER_TIMEOUT=30s
910 volumes :
10- - type : bind
11- source : ' ${PWD}'
12- target : /var/www/html
1311 - type : tmpfs
1412 target : /tmp:rw,exec
1513 volume :
@@ -34,5 +32,3 @@ services:
3432 target : /dev/tests/integration/tmp
3533 volume :
3634 nocopy : true
37-
38-
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -auo pipefail
4+
5+ if [ " ${CONTAINER_TIMEOUT:- } " == " no" ]; then
6+ echo " Container timeout disabled"
7+ while true ; do
8+ sleep 1h
9+ done
10+ fi
11+
12+ sleep " ${CONTAINER_TIMEOUT:- 1h} "
13+ echo " Container timeout reached, exiting"
14+ exit 1
You can’t perform that action at this time.
0 commit comments