forked from cytopia/docker-bind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (57 loc) · 2.06 KB
/
.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
language: python
python:
- 2.7
###
### Add services
###
services:
- docker
###
### Global variables
###
env:
global:
- MY_DOCKER_NAME="my-bind-docker"
###
### Install
###
install:
# Create overview section script
- echo "#!/bin/sh" > /tmp/section.sh
- echo " echo '===================================================================================================='" >> /tmp/section.sh
- echo " echo '===================================================================================================='" >> /tmp/section.sh
- echo " echo \"= \${1}\"" >> /tmp/section.sh
- echo " echo '===================================================================================================='" >> /tmp/section.sh
- echo " echo '===================================================================================================='" >> /tmp/section.sh
- chmod +x /tmp/section.sh
# Show Docker version
- docker version
# Build my docker
- docker build -t cytopia/${MY_DOCKER_NAME} .
###
### Test
###
script:
################################################################################
## 01.) [a](DEBUG) Test plain docker
################################################################################
- /tmp/section.sh "01.) [a](DEBUG) Test plain docker"
- docker run
-e DEBUG_COMPOSE_ENTRYPOINT=1
--name ${MY_DOCKER_NAME} cytopia/${MY_DOCKER_NAME} &
- sleep 5
- docker ps
- docker exec ${MY_DOCKER_NAME} named -V
- docker exec ${MY_DOCKER_NAME} named -V | grep -oiE '^BIND[[:space:]]+[0-9.]+'
- docker stop "$( docker ps | grep "${MY_DOCKER_NAME}" | awk '{print $1}' )"
- docker rm "${MY_DOCKER_NAME}"
- /tmp/section.sh "01.) [a](DEBUG) Test plain docker"
- docker run
-e DEBUG_COMPOSE_ENTRYPOINT=0
--name ${MY_DOCKER_NAME} cytopia/${MY_DOCKER_NAME} &
- sleep 5
- docker ps
- docker exec ${MY_DOCKER_NAME} named -V
- docker exec ${MY_DOCKER_NAME} named -V | grep -oiE '^BIND[[:space:]]+[0-9.]+'
- docker stop "$( docker ps | grep "${MY_DOCKER_NAME}" | awk '{print $1}' )"
- docker rm "${MY_DOCKER_NAME}"