-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
29 lines (26 loc) · 996 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dist: xenial
language: minimal
services:
- docker
env:
global:
- SLUG="${TRAVIS_REPO_SLUG/docker-/}"
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
script:
- sudo mkdir /media/DockerDownloads
- sudo mkdir /media/DockerData
- sudo mkdir /media/Data
- docker-compose up -d
- sleep 120
# Display containers
- docker ps --all
# Detect if any containers are unhealthy and fail
- docker ps --all | grep 'starting\|unhealthy' && return 1 || true
# Inspect unhealthy containers
- docker ps --all | grep 'starting\|unhealthy' | cut -f1 -d ' ' | xargs docker inspect || true
# Display logs of unhealthy containers
- docker ps --all | grep 'starting\|unhealthy' | cut -f1 -d ' ' | xargs docker logs || true