diff options
author | William Yeh <william.pjyeh@gmail.com> | 2016-05-09 16:34:32 +0800 |
---|---|---|
committer | William Yeh <william.pjyeh@gmail.com> | 2016-05-10 17:17:33 +0800 |
commit | 97d48efeb67f4f7566752625ad3ce233f31985be (patch) | |
tree | 20ce7984d99bf5f6b770fce81384790027723517 | |
parent | b314855954aa117b1294056891d16f43a6b1b9d0 (diff) | |
download | docker-ansible-97d48efeb67f4f7566752625ad3ce233f31985be.tar.gz docker-ansible-97d48efeb67f4f7566752625ad3ce233f31985be.tar.zst docker-ansible-97d48efeb67f4f7566752625ad3ce233f31985be.zip |
Add: support for Ubuntu 16.04 LTS (Xenial).
Fix:
1. OS-level packages `libffi-dev` and `libssl-dev`/`openssl-dev` should be installed explicitly since Ansible 2.0.2.0(???).
2. Python package cffi should be installed explicitly since Ansible 2.0.2.0(???).
3. add '--fix-missing' for apt.
@see https://github.com/boxcutter/ubuntu/issues/62
@see https://github.com/pyca/cryptography/issues/2280
39 files changed, 505 insertions, 105 deletions
diff --git a/.travis.yml b/.travis.yml index 060b99c..4e5dfcb 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -6,6 +6,7 @@ before_install: | |||
6 | - docker info | 6 | - docker info |
7 | - docker version | 7 | - docker version |
8 | 8 | ||
9 | - docker build -t ansible_xenial ubuntu16.04 | ||
9 | - docker build -t ansible_trusty ubuntu14.04 | 10 | - docker build -t ansible_trusty ubuntu14.04 |
10 | - docker build -t ansible_precise ubuntu12.04 | 11 | - docker build -t ansible_precise ubuntu12.04 |
11 | - docker build -t ansible_jessie debian8 | 12 | - docker build -t ansible_jessie debian8 |
@@ -14,6 +15,7 @@ before_install: | |||
14 | - docker build -t ansible_centos6 centos6 | 15 | - docker build -t ansible_centos6 centos6 |
15 | - docker build -t ansible_alpine3 alpine3 | 16 | - docker build -t ansible_alpine3 alpine3 |
16 | 17 | ||
18 | - docker build -t ansible_xenial_onbuild ubuntu16.04-onbuild | ||
17 | - docker build -t ansible_trusty_onbuild ubuntu14.04-onbuild | 19 | - docker build -t ansible_trusty_onbuild ubuntu14.04-onbuild |
18 | - docker build -t ansible_precise_onbuild ubuntu12.04-onbuild | 20 | - docker build -t ansible_precise_onbuild ubuntu12.04-onbuild |
19 | - docker build -t ansible_jessie_onbuild debian8-onbuild | 21 | - docker build -t ansible_jessie_onbuild debian8-onbuild |
@@ -40,6 +42,7 @@ before_install: | |||
40 | - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild | 42 | - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild |
41 | 43 | ||
42 | 44 | ||
45 | - docker build -t ansible_master_xenial master-ubuntu16.04 | ||
43 | - docker build -t ansible_master_trusty master-ubuntu14.04 | 46 | - docker build -t ansible_master_trusty master-ubuntu14.04 |
44 | - docker build -t ansible_master_precise master-ubuntu12.04 | 47 | - docker build -t ansible_master_precise master-ubuntu12.04 |
45 | - docker build -t ansible_master_jessie master-debian8 | 48 | - docker build -t ansible_master_jessie master-debian8 |
@@ -47,6 +50,7 @@ before_install: | |||
47 | - docker build -t ansible_master_centos7 master-centos7 | 50 | - docker build -t ansible_master_centos7 master-centos7 |
48 | - docker build -t ansible_master_centos6 master-centos6 | 51 | - docker build -t ansible_master_centos6 master-centos6 |
49 | 52 | ||
53 | - docker build -t ansible_master_xenial_onbuild master-ubuntu16.04-onbuild | ||
50 | - docker build -t ansible_master_trusty_onbuild master-ubuntu14.04-onbuild | 54 | - docker build -t ansible_master_trusty_onbuild master-ubuntu14.04-onbuild |
51 | - docker build -t ansible_master_precise_onbuild master-ubuntu12.04-onbuild | 55 | - docker build -t ansible_master_precise_onbuild master-ubuntu12.04-onbuild |
52 | - docker build -t ansible_master_jessie_onbuild master-debian8-onbuild | 56 | - docker build -t ansible_master_jessie_onbuild master-debian8-onbuild |
@@ -55,6 +59,7 @@ before_install: | |||
55 | - docker build -t ansible_master_centos6_onbuild master-centos6-onbuild | 59 | - docker build -t ansible_master_centos6_onbuild master-centos6-onbuild |
56 | 60 | ||
57 | script: | 61 | script: |
62 | - docker run -i ansible_xenial > result-ubuntu16.04 | ||
58 | - docker run -i ansible_trusty > result-ubuntu14.04 | 63 | - docker run -i ansible_trusty > result-ubuntu14.04 |
59 | - docker run -i ansible_precise > result-ubuntu12.04 | 64 | - docker run -i ansible_precise > result-ubuntu12.04 |
60 | - docker run -i ansible_jessie > result-debian8 | 65 | - docker run -i ansible_jessie > result-debian8 |
@@ -62,6 +67,7 @@ script: | |||
62 | - docker run -i ansible_centos7 > result-centos7 | 67 | - docker run -i ansible_centos7 > result-centos7 |
63 | - docker run -i ansible_centos6 > result-centos6 | 68 | - docker run -i ansible_centos6 > result-centos6 |
64 | - docker run -i ansible_alpine3 > result-alpine3 | 69 | - docker run -i ansible_alpine3 > result-alpine3 |
70 | - docker run -i ansible_xenial_onbuild > result-ubuntu16.04-onbuild | ||
65 | - docker run -i ansible_trusty_onbuild > result-ubuntu14.04-onbuild | 71 | - docker run -i ansible_trusty_onbuild > result-ubuntu14.04-onbuild |
66 | - docker run -i ansible_precise_onbuild > result-ubuntu12.04-onbuild | 72 | - docker run -i ansible_precise_onbuild > result-ubuntu12.04-onbuild |
67 | - docker run -i ansible_jessie_onbuild > result-debian8-onbuild | 73 | - docker run -i ansible_jessie_onbuild > result-debian8-onbuild |
@@ -87,12 +93,14 @@ script: | |||
87 | - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild | 93 | - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild |
88 | 94 | ||
89 | 95 | ||
96 | - docker run -i ansible_master_xenial > result-master-ubuntu16.04 | ||
90 | - docker run -i ansible_master_trusty > result-master-ubuntu14.04 | 97 | - docker run -i ansible_master_trusty > result-master-ubuntu14.04 |
91 | - docker run -i ansible_master_precise > result-master-ubuntu12.04 | 98 | - docker run -i ansible_master_precise > result-master-ubuntu12.04 |
92 | - docker run -i ansible_master_jessie > result-master-debian8 | 99 | - docker run -i ansible_master_jessie > result-master-debian8 |
93 | - docker run -i ansible_master_wheezy > result-master-debian7 | 100 | - docker run -i ansible_master_wheezy > result-master-debian7 |
94 | - docker run -i ansible_master_centos7 > result-master-centos7 | 101 | - docker run -i ansible_master_centos7 > result-master-centos7 |
95 | - docker run -i ansible_master_centos6 > result-master-centos6 | 102 | - docker run -i ansible_master_centos6 > result-master-centos6 |
103 | - docker run -i ansible_master_xenial_onbuild > result-master-ubuntu16.04-onbuild | ||
96 | - docker run -i ansible_master_trusty_onbuild > result-master-ubuntu14.04-onbuild | 104 | - docker run -i ansible_master_trusty_onbuild > result-master-ubuntu14.04-onbuild |
97 | - docker run -i ansible_master_precise_onbuild > result-master-ubuntu12.04-onbuild | 105 | - docker run -i ansible_master_precise_onbuild > result-master-ubuntu12.04-onbuild |
98 | - docker run -i ansible_master_jessie_onbuild > result-master-debian8-onbuild | 106 | - docker run -i ansible_master_jessie_onbuild > result-master-debian8-onbuild |
@@ -103,6 +111,7 @@ script: | |||
103 | 111 | ||
104 | 112 | ||
105 | - echo "==> Validating the test results..." | 113 | - echo "==> Validating the test results..." |
114 | - sh -c "[ -s result-ubuntu16.04 ]" | ||
106 | - sh -c "[ -s result-ubuntu14.04 ]" | 115 | - sh -c "[ -s result-ubuntu14.04 ]" |
107 | - sh -c "[ -s result-ubuntu12.04 ]" | 116 | - sh -c "[ -s result-ubuntu12.04 ]" |
108 | - sh -c "[ -s result-debian8 ]" | 117 | - sh -c "[ -s result-debian8 ]" |
@@ -110,6 +119,7 @@ script: | |||
110 | - sh -c "[ -s result-centos7 ]" | 119 | - sh -c "[ -s result-centos7 ]" |
111 | - sh -c "[ -s result-centos6 ]" | 120 | - sh -c "[ -s result-centos6 ]" |
112 | - sh -c "[ -s result-alpine3 ]" | 121 | - sh -c "[ -s result-alpine3 ]" |
122 | - sh -c "[ -s result-ubuntu16.04-onbuild ]" | ||
113 | - sh -c "[ -s result-ubuntu14.04-onbuild ]" | 123 | - sh -c "[ -s result-ubuntu14.04-onbuild ]" |
114 | - sh -c "[ -s result-ubuntu12.04-onbuild ]" | 124 | - sh -c "[ -s result-ubuntu12.04-onbuild ]" |
115 | - sh -c "[ -s result-debian8-onbuild ]" | 125 | - sh -c "[ -s result-debian8-onbuild ]" |
@@ -133,12 +143,14 @@ script: | |||
133 | - sh -c "[ -s result-1.9-centos6-onbuild ]" | 143 | - sh -c "[ -s result-1.9-centos6-onbuild ]" |
134 | - sh -c "[ -s result-1.9-alpine3-onbuild ]" | 144 | - sh -c "[ -s result-1.9-alpine3-onbuild ]" |
135 | 145 | ||
146 | - sh -c "[ -s result-master-ubuntu16.04 ]" | ||
136 | - sh -c "[ -s result-master-ubuntu14.04 ]" | 147 | - sh -c "[ -s result-master-ubuntu14.04 ]" |
137 | - sh -c "[ -s result-master-ubuntu12.04 ]" | 148 | - sh -c "[ -s result-master-ubuntu12.04 ]" |
138 | - sh -c "[ -s result-master-debian8 ]" | 149 | - sh -c "[ -s result-master-debian8 ]" |
139 | - sh -c "[ -s result-master-debian7 ]" | 150 | - sh -c "[ -s result-master-debian7 ]" |
140 | - sh -c "[ -s result-master-centos7 ]" | 151 | - sh -c "[ -s result-master-centos7 ]" |
141 | - sh -c "[ -s result-master-centos6 ]" | 152 | - sh -c "[ -s result-master-centos6 ]" |
153 | - sh -c "[ -s result-master-ubuntu16.04-onbuild ]" | ||
142 | - sh -c "[ -s result-master-ubuntu14.04-onbuild ]" | 154 | - sh -c "[ -s result-master-ubuntu14.04-onbuild ]" |
143 | - sh -c "[ -s result-master-ubuntu12.04-onbuild ]" | 155 | - sh -c "[ -s result-master-ubuntu12.04-onbuild ]" |
144 | - sh -c "[ -s result-master-debian8-onbuild ]" | 156 | - sh -c "[ -s result-master-debian8-onbuild ]" |
diff --git a/1.9-alpine3-onbuild/Dockerfile b/1.9-alpine3-onbuild/Dockerfile index 2af2f48..aefffe7 100644 --- a/1.9-alpine3-onbuild/Dockerfile +++ b/1.9-alpine3-onbuild/Dockerfile | |||
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Python runtime..." && \ | 15 | RUN echo "===> Adding Python runtime..." && \ |
16 | apk --update add python py-pip openssl ca-certificates && \ | 16 | apk --update add python py-pip openssl ca-certificates && \ |
17 | apk --update add --virtual build-dependencies python-dev build-base && \ | 17 | apk --update add --virtual build-dependencies \ |
18 | pip install --upgrade pip && \ | 18 | python-dev libffi-dev openssl-dev build-base && \ |
19 | pip install --upgrade pip cffi && \ | ||
19 | \ | 20 | \ |
20 | \ | 21 | \ |
21 | echo "===> Installing Ansible..." && \ | 22 | echo "===> Installing Ansible..." && \ |
diff --git a/1.9-alpine3/Dockerfile b/1.9-alpine3/Dockerfile index fe62f16..bf6d3ae 100644 --- a/1.9-alpine3/Dockerfile +++ b/1.9-alpine3/Dockerfile | |||
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Python runtime..." && \ | 15 | RUN echo "===> Adding Python runtime..." && \ |
16 | apk --update add python py-pip openssl ca-certificates && \ | 16 | apk --update add python py-pip openssl ca-certificates && \ |
17 | apk --update add --virtual build-dependencies python-dev build-base && \ | 17 | apk --update add --virtual build-dependencies \ |
18 | pip install --upgrade pip && \ | 18 | python-dev libffi-dev openssl-dev build-base && \ |
19 | pip install --upgrade pip cffi && \ | ||
19 | \ | 20 | \ |
20 | \ | 21 | \ |
21 | echo "===> Installing Ansible..." && \ | 22 | echo "===> Installing Ansible..." && \ |
diff --git a/1.9-centos6-onbuild/Dockerfile b/1.9-centos6-onbuild/Dockerfile index 01fd565..ff7ce39 100644 --- a/1.9-centos6-onbuild/Dockerfile +++ b/1.9-centos6-onbuild/Dockerfile | |||
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..." && \ | |||
26 | \ | 26 | \ |
27 | \ | 27 | \ |
28 | echo "===> Adding Ansible's prerequisites..." && \ | 28 | echo "===> Adding Ansible's prerequisites..." && \ |
29 | yum -y install gcc python-devel python-pip && \ | 29 | yum -y install gcc python-devel python-pip \ |
30 | libffi-devel openssl-devel && \ | ||
30 | pip install --upgrade pip && \ | 31 | pip install --upgrade pip && \ |
31 | \ | 32 | \ |
32 | \ | 33 | \ |
33 | echo "===> Installing Ansible..." && \ | 34 | echo "===> Installing Ansible..." && \ |
34 | pip install ansible==1.9.4 && \ | 35 | pip install --upgrade ansible==1.9.4 && \ |
35 | \ | 36 | \ |
36 | \ | 37 | \ |
37 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 38 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..." && \ | |||
39 | \ | 40 | \ |
40 | \ | 41 | \ |
41 | echo "===> Removing unused YUM resources..." && \ | 42 | echo "===> Removing unused YUM resources..." && \ |
42 | yum -y remove epel-release gcc python-devel python-pip && \ | 43 | yum -y remove epel-release gcc python-devel python-pip \ |
44 | libffi-devel openssl-devel || true && \ | ||
43 | yum clean all && \ | 45 | yum clean all && \ |
44 | \ | 46 | \ |
45 | \ | 47 | \ |
diff --git a/1.9-centos6/Dockerfile b/1.9-centos6/Dockerfile index dc450d6..f56f76f 100644 --- a/1.9-centos6/Dockerfile +++ b/1.9-centos6/Dockerfile | |||
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..." && \ | |||
26 | \ | 26 | \ |
27 | \ | 27 | \ |
28 | echo "===> Adding Ansible's prerequisites..." && \ | 28 | echo "===> Adding Ansible's prerequisites..." && \ |
29 | yum -y install gcc python-devel python-pip && \ | 29 | yum -y install gcc python-devel python-pip \ |
30 | libffi-devel openssl-devel && \ | ||
30 | pip install --upgrade pip && \ | 31 | pip install --upgrade pip && \ |
31 | \ | 32 | \ |
32 | \ | 33 | \ |
33 | echo "===> Installing Ansible..." && \ | 34 | echo "===> Installing Ansible..." && \ |
34 | pip install ansible==1.9.4 && \ | 35 | pip install --upgrade ansible==1.9.4 && \ |
35 | \ | 36 | \ |
36 | \ | 37 | \ |
37 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 38 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..." && \ | |||
39 | \ | 40 | \ |
40 | \ | 41 | \ |
41 | echo "===> Removing unused YUM resources..." && \ | 42 | echo "===> Removing unused YUM resources..." && \ |
42 | yum -y remove epel-release gcc python-devel python-pip && \ | 43 | yum -y remove epel-release gcc python-devel python-pip \ |
44 | libffi-devel openssl-devel || true && \ | ||
43 | yum clean all && \ | 45 | yum clean all && \ |
44 | \ | 46 | \ |
45 | \ | 47 | \ |
diff --git a/1.9-centos7-onbuild/Dockerfile b/1.9-centos7-onbuild/Dockerfile index 7b8e028..ef182e6 100644 --- a/1.9-centos7-onbuild/Dockerfile +++ b/1.9-centos7-onbuild/Dockerfile | |||
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..." && \ | |||
41 | \ | 41 | \ |
42 | \ | 42 | \ |
43 | echo "===> Adding Ansible's prerequisites..." && \ | 43 | echo "===> Adding Ansible's prerequisites..." && \ |
44 | yum -y install gcc python-devel python-pip && \ | 44 | yum -y install gcc python-devel python-pip \ |
45 | libffi-devel openssl-devel && \ | ||
45 | pip install --upgrade pip && \ | 46 | pip install --upgrade pip && \ |
46 | \ | 47 | \ |
47 | \ | 48 | \ |
48 | echo "===> Installing Ansible..." && \ | 49 | echo "===> Installing Ansible..." && \ |
49 | pip install ansible==1.9.4 && \ | 50 | pip install --upgrade ansible==1.9.4 && \ |
50 | \ | 51 | \ |
51 | \ | 52 | \ |
52 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 53 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..." && \ | |||
54 | \ | 55 | \ |
55 | \ | 56 | \ |
56 | echo "===> Removing unused YUM resources..." && \ | 57 | echo "===> Removing unused YUM resources..." && \ |
57 | yum -y remove epel-release gcc python-devel python-pip && \ | 58 | yum -y remove epel-release gcc python-devel python-pip \ |
59 | libffi-devel openssl-devel || true && \ | ||
58 | yum clean all && \ | 60 | yum clean all && \ |
59 | \ | 61 | \ |
60 | \ | 62 | \ |
diff --git a/1.9-centos7/Dockerfile b/1.9-centos7/Dockerfile index 8d6da85..9ae523a 100644 --- a/1.9-centos7/Dockerfile +++ b/1.9-centos7/Dockerfile | |||
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..." && \ | |||
41 | \ | 41 | \ |
42 | \ | 42 | \ |
43 | echo "===> Adding Ansible's prerequisites..." && \ | 43 | echo "===> Adding Ansible's prerequisites..." && \ |
44 | yum -y install gcc python-devel python-pip && \ | 44 | yum -y install gcc python-devel python-pip \ |
45 | libffi-devel openssl-devel && \ | ||
45 | pip install --upgrade pip && \ | 46 | pip install --upgrade pip && \ |
46 | \ | 47 | \ |
47 | \ | 48 | \ |
48 | echo "===> Installing Ansible..." && \ | 49 | echo "===> Installing Ansible..." && \ |
49 | pip install ansible==1.9.4 && \ | 50 | pip install --upgrade ansible==1.9.4 && \ |
50 | \ | 51 | \ |
51 | \ | 52 | \ |
52 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 53 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..." && \ | |||
54 | \ | 55 | \ |
55 | \ | 56 | \ |
56 | echo "===> Removing unused YUM resources..." && \ | 57 | echo "===> Removing unused YUM resources..." && \ |
57 | yum -y remove epel-release gcc python-devel python-pip && \ | 58 | yum -y remove epel-release gcc python-devel python-pip \ |
59 | libffi-devel openssl-devel || true && \ | ||
58 | yum clean all && \ | 60 | yum clean all && \ |
59 | \ | 61 | \ |
60 | \ | 62 | \ |
diff --git a/1.9-debian7-onbuild/Dockerfile b/1.9-debian7-onbuild/Dockerfile index 5ca7ce3..ec8f2d1 100644 --- a/1.9-debian7-onbuild/Dockerfile +++ b/1.9-debian7-onbuild/Dockerfile | |||
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | pip install --upgrade cffi && \ | ||
21 | \ | 22 | \ |
22 | \ | 23 | \ |
23 | echo "===> Installing Ansible..." && \ | 24 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 26 | \ |
26 | \ | 27 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 28 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 29 | apt-get -f -y --auto-remove remove \ |
30 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 31 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 32 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 33 | \ |
diff --git a/1.9-debian7/Dockerfile b/1.9-debian7/Dockerfile index 8d746e7..5033911 100644 --- a/1.9-debian7/Dockerfile +++ b/1.9-debian7/Dockerfile | |||
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | pip install --upgrade cffi && \ | ||
21 | \ | 22 | \ |
22 | \ | 23 | \ |
23 | echo "===> Installing Ansible..." && \ | 24 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 26 | \ |
26 | \ | 27 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 28 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 29 | apt-get -f -y --auto-remove remove \ |
30 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 31 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 32 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 33 | \ |
diff --git a/1.9-debian8-onbuild/Dockerfile b/1.9-debian8-onbuild/Dockerfile index 66756bd..5ad3bb3 100644 --- a/1.9-debian8-onbuild/Dockerfile +++ b/1.9-debian8-onbuild/Dockerfile | |||
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | apt-get -y --purge remove python-cffi && \ | ||
22 | pip install --upgrade cffi && \ | ||
21 | \ | 23 | \ |
22 | \ | 24 | \ |
23 | echo "===> Installing Ansible..." && \ | 25 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 27 | \ |
26 | \ | 28 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 29 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 30 | apt-get -f -y --auto-remove remove \ |
31 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 32 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 33 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 34 | \ |
diff --git a/1.9-debian8/Dockerfile b/1.9-debian8/Dockerfile index 47d59e1..c76477d 100644 --- a/1.9-debian8/Dockerfile +++ b/1.9-debian8/Dockerfile | |||
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | apt-get -y --purge remove python-cffi && \ | ||
22 | pip install --upgrade cffi && \ | ||
21 | \ | 23 | \ |
22 | \ | 24 | \ |
23 | echo "===> Installing Ansible..." && \ | 25 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 27 | \ |
26 | \ | 28 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 29 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 30 | apt-get -f -y --auto-remove remove \ |
31 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 32 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 33 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 34 | \ |
@@ -16,7 +16,7 @@ This repository contains Dockerized [Ansible](https://github.com/ansible/ansible | |||
16 | 16 | ||
17 | These are Docker images for [Ansible](https://github.com/ansible/ansible) software, installed in a selected Linux distributions. | 17 | These are Docker images for [Ansible](https://github.com/ansible/ansible) software, installed in a selected Linux distributions. |
18 | 18 | ||
19 | - OS: Debian (jessie, wheezy), Ubuntu (trusty, precise), CentOS (7, 6), Alpine (3). | 19 | - OS: Debian (jessie, wheezy), Ubuntu (xenial, trusty, precise), CentOS (7, 6), Alpine (3). |
20 | 20 | ||
21 | - Ansible: three version series - | 21 | - Ansible: three version series - |
22 | 22 | ||
@@ -33,6 +33,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa | |||
33 | 33 | ||
34 | - `williamyeh/ansible:debian8` | 34 | - `williamyeh/ansible:debian8` |
35 | - `williamyeh/ansible:debian7` | 35 | - `williamyeh/ansible:debian7` |
36 | - `williamyeh/ansible:ubuntu16.04` | ||
36 | - `williamyeh/ansible:ubuntu14.04` | 37 | - `williamyeh/ansible:ubuntu14.04` |
37 | - `williamyeh/ansible:ubuntu12.04` | 38 | - `williamyeh/ansible:ubuntu12.04` |
38 | - `williamyeh/ansible:centos7` | 39 | - `williamyeh/ansible:centos7` |
@@ -43,6 +44,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa | |||
43 | 44 | ||
44 | - `williamyeh/ansible:debian8-onbuild` | 45 | - `williamyeh/ansible:debian8-onbuild` |
45 | - `williamyeh/ansible:debian7-onbuild` | 46 | - `williamyeh/ansible:debian7-onbuild` |
47 | - `williamyeh/ansible:ubuntu16.04-onbuild` | ||
46 | - `williamyeh/ansible:ubuntu14.04-onbuild` | 48 | - `williamyeh/ansible:ubuntu14.04-onbuild` |
47 | - `williamyeh/ansible:ubuntu12.04-onbuild` | 49 | - `williamyeh/ansible:ubuntu12.04-onbuild` |
48 | - `williamyeh/ansible:centos7-onbuild` | 50 | - `williamyeh/ansible:centos7-onbuild` |
@@ -77,6 +79,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa | |||
77 | 79 | ||
78 | - `williamyeh/ansible:master-debian8` | 80 | - `williamyeh/ansible:master-debian8` |
79 | - `williamyeh/ansible:master-debian7` | 81 | - `williamyeh/ansible:master-debian7` |
82 | - `williamyeh/ansible:master-ubuntu16.04` | ||
80 | - `williamyeh/ansible:master-ubuntu14.04` | 83 | - `williamyeh/ansible:master-ubuntu14.04` |
81 | - `williamyeh/ansible:master-ubuntu12.04` | 84 | - `williamyeh/ansible:master-ubuntu12.04` |
82 | - `williamyeh/ansible:master-centos7` | 85 | - `williamyeh/ansible:master-centos7` |
@@ -86,6 +89,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa | |||
86 | 89 | ||
87 | - `williamyeh/ansible:master-debian8-onbuild` | 90 | - `williamyeh/ansible:master-debian8-onbuild` |
88 | - `williamyeh/ansible:master-debian7-onbuild` | 91 | - `williamyeh/ansible:master-debian7-onbuild` |
92 | - `williamyeh/ansible:master-ubuntu16.04-onbuild` | ||
89 | - `williamyeh/ansible:master-ubuntu14.04-onbuild` | 93 | - `williamyeh/ansible:master-ubuntu14.04-onbuild` |
90 | - `williamyeh/ansible:master-ubuntu12.04-onbuild` | 94 | - `williamyeh/ansible:master-ubuntu12.04-onbuild` |
91 | - `williamyeh/ansible:master-centos7-onbuild` | 95 | - `williamyeh/ansible:master-centos7-onbuild` |
@@ -121,7 +125,7 @@ Third, `docker build .` | |||
121 | 125 | ||
122 | Done! | 126 | Done! |
123 | 127 | ||
124 | For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions via [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances. | 128 | For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions on [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances. |
125 | 129 | ||
126 | 130 | ||
127 | 131 | ||
@@ -170,6 +174,7 @@ Take Debian/Ubuntu/CentOS for example. To test an Ansible `playbook.yml` against | |||
170 | Vagrant.configure(2) do |config| | 174 | Vagrant.configure(2) do |config| |
171 | 175 | ||
172 | # ==> Choose a Vagrant box to emulate Linux distribution... | 176 | # ==> Choose a Vagrant box to emulate Linux distribution... |
177 | #config.vm.box = "ubuntu/xenial64" | ||
173 | config.vm.box = "ubuntu/trusty64" | 178 | config.vm.box = "ubuntu/trusty64" |
174 | #config.vm.box = "ubuntu/precise64" | 179 | #config.vm.box = "ubuntu/precise64" |
175 | #config.vm.box = "debian/jessie64" | 180 | #config.vm.box = "debian/jessie64" |
@@ -197,6 +202,7 @@ Docker to be a rescue. Now, with these **williamyeh/ansible** series, we may tes | |||
197 | # Dockerfile | 202 | # Dockerfile |
198 | 203 | ||
199 | # ==> Choose a base image to emulate Linux distribution... | 204 | # ==> Choose a base image to emulate Linux distribution... |
205 | #FROM williamyeh/ansible:ubuntu16.04 | ||
200 | FROM williamyeh/ansible:ubuntu14.04 | 206 | FROM williamyeh/ansible:ubuntu14.04 |
201 | #FROM williamyeh/ansible:ubuntu12.04 | 207 | #FROM williamyeh/ansible:ubuntu12.04 |
202 | #FROM williamyeh/ansible:debian8 | 208 | #FROM williamyeh/ansible:debian8 |
@@ -224,6 +230,7 @@ You may also work with `onbuild` series, which take care of many routine steps f | |||
224 | # Dockerfile | 230 | # Dockerfile |
225 | 231 | ||
226 | # ==> Choose a base image to emulate Linux distribution... | 232 | # ==> Choose a base image to emulate Linux distribution... |
233 | #FROM williamyeh/ansible:ubuntu16.04-onbuild | ||
227 | FROM williamyeh/ansible:ubuntu14.04-onbuild | 234 | FROM williamyeh/ansible:ubuntu14.04-onbuild |
228 | #FROM williamyeh/ansible:ubuntu12.04-onbuild | 235 | #FROM williamyeh/ansible:ubuntu12.04-onbuild |
229 | #FROM williamyeh/ansible:debian8-onbuild | 236 | #FROM williamyeh/ansible:debian8-onbuild |
diff --git a/Vagrantfile b/Vagrantfile index 46458fb..9bb4898 100644 --- a/Vagrantfile +++ b/Vagrantfile | |||
@@ -4,6 +4,7 @@ Vagrant.configure(2) do |config| | |||
4 | config.vm.provision "shell", inline: <<-SHELL | 4 | config.vm.provision "shell", inline: <<-SHELL |
5 | cd /vagrant | 5 | cd /vagrant |
6 | 6 | ||
7 | docker build -t ansible:ubuntu16.04 ubuntu16.04 | ||
7 | docker build -t ansible:ubuntu14.04 ubuntu14.04 | 8 | docker build -t ansible:ubuntu14.04 ubuntu14.04 |
8 | docker build -t ansible:ubuntu12.04 ubuntu12.04 | 9 | docker build -t ansible:ubuntu12.04 ubuntu12.04 |
9 | docker build -t ansible:debian8 debian8 | 10 | docker build -t ansible:debian8 debian8 |
@@ -12,6 +13,7 @@ Vagrant.configure(2) do |config| | |||
12 | docker build -t ansible:centos6 centos6 | 13 | docker build -t ansible:centos6 centos6 |
13 | docker build -t ansible:alpine3 alpine3 | 14 | docker build -t ansible:alpine3 alpine3 |
14 | 15 | ||
16 | docker build -t ansible:ubuntu16.04-onbuild ubuntu16.04-onbuild | ||
15 | docker build -t ansible:ubuntu14.04-onbuild ubuntu14.04-onbuild | 17 | docker build -t ansible:ubuntu14.04-onbuild ubuntu14.04-onbuild |
16 | docker build -t ansible:ubuntu12.04-onbuild ubuntu12.04-onbuild | 18 | docker build -t ansible:ubuntu12.04-onbuild ubuntu12.04-onbuild |
17 | docker build -t ansible:debian8-onbuild debian8-onbuild | 19 | docker build -t ansible:debian8-onbuild debian8-onbuild |
diff --git a/alpine3-onbuild/Dockerfile b/alpine3-onbuild/Dockerfile index 777ddec..a11dc9e 100644 --- a/alpine3-onbuild/Dockerfile +++ b/alpine3-onbuild/Dockerfile | |||
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Python runtime..." && \ | 15 | RUN echo "===> Adding Python runtime..." && \ |
16 | apk --update add python py-pip openssl ca-certificates && \ | 16 | apk --update add python py-pip openssl ca-certificates && \ |
17 | apk --update add --virtual build-dependencies python-dev build-base && \ | 17 | apk --update add --virtual build-dependencies \ |
18 | pip install --upgrade pip && \ | 18 | python-dev libffi-dev openssl-dev build-base && \ |
19 | pip install --upgrade pip cffi && \ | ||
19 | \ | 20 | \ |
20 | \ | 21 | \ |
21 | echo "===> Installing Ansible..." && \ | 22 | echo "===> Installing Ansible..." && \ |
diff --git a/alpine3/Dockerfile b/alpine3/Dockerfile index 28550b2..87b22c7 100644 --- a/alpine3/Dockerfile +++ b/alpine3/Dockerfile | |||
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Python runtime..." && \ | 15 | RUN echo "===> Adding Python runtime..." && \ |
16 | apk --update add python py-pip openssl ca-certificates && \ | 16 | apk --update add python py-pip openssl ca-certificates && \ |
17 | apk --update add --virtual build-dependencies python-dev build-base && \ | 17 | apk --update add --virtual build-dependencies \ |
18 | pip install --upgrade pip && \ | 18 | python-dev libffi-dev openssl-dev build-base && \ |
19 | pip install --upgrade pip cffi && \ | ||
19 | \ | 20 | \ |
20 | \ | 21 | \ |
21 | echo "===> Installing Ansible..." && \ | 22 | echo "===> Installing Ansible..." && \ |
diff --git a/centos6-onbuild/Dockerfile b/centos6-onbuild/Dockerfile index 56855ef..a520a0f 100644 --- a/centos6-onbuild/Dockerfile +++ b/centos6-onbuild/Dockerfile | |||
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..." && \ | |||
26 | \ | 26 | \ |
27 | \ | 27 | \ |
28 | echo "===> Adding Ansible's prerequisites..." && \ | 28 | echo "===> Adding Ansible's prerequisites..." && \ |
29 | yum -y install gcc python-devel python-pip && \ | 29 | yum -y install gcc python-devel python-pip \ |
30 | libffi-devel openssl-devel && \ | ||
30 | pip install --upgrade pip && \ | 31 | pip install --upgrade pip && \ |
31 | \ | 32 | \ |
32 | \ | 33 | \ |
33 | echo "===> Installing Ansible..." && \ | 34 | echo "===> Installing Ansible..." && \ |
34 | pip install ansible && \ | 35 | pip install --upgrade ansible && \ |
35 | \ | 36 | \ |
36 | \ | 37 | \ |
37 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 38 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..." && \ | |||
39 | \ | 40 | \ |
40 | \ | 41 | \ |
41 | echo "===> Removing unused YUM resources..." && \ | 42 | echo "===> Removing unused YUM resources..." && \ |
42 | yum -y remove epel-release gcc python-devel python-pip && \ | 43 | yum -y remove epel-release gcc python-devel python-pip \ |
44 | libffi-devel openssl-devel || true && \ | ||
43 | yum clean all && \ | 45 | yum clean all && \ |
44 | \ | 46 | \ |
45 | \ | 47 | \ |
diff --git a/centos6/Dockerfile b/centos6/Dockerfile index fe13935..034e5a8 100644 --- a/centos6/Dockerfile +++ b/centos6/Dockerfile | |||
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..." && \ | |||
26 | \ | 26 | \ |
27 | \ | 27 | \ |
28 | echo "===> Adding Ansible's prerequisites..." && \ | 28 | echo "===> Adding Ansible's prerequisites..." && \ |
29 | yum -y install gcc python-devel python-pip && \ | 29 | yum -y install gcc python-devel python-pip \ |
30 | libffi-devel openssl-devel && \ | ||
30 | pip install --upgrade pip && \ | 31 | pip install --upgrade pip && \ |
31 | \ | 32 | \ |
32 | \ | 33 | \ |
33 | echo "===> Installing Ansible..." && \ | 34 | echo "===> Installing Ansible..." && \ |
34 | pip install ansible && \ | 35 | pip install --upgrade ansible && \ |
35 | \ | 36 | \ |
36 | \ | 37 | \ |
37 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 38 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..." && \ | |||
39 | \ | 40 | \ |
40 | \ | 41 | \ |
41 | echo "===> Removing unused YUM resources..." && \ | 42 | echo "===> Removing unused YUM resources..." && \ |
42 | yum -y remove epel-release gcc python-devel python-pip && \ | 43 | yum -y remove epel-release gcc python-devel python-pip \ |
44 | libffi-devel openssl-devel || true && \ | ||
43 | yum clean all && \ | 45 | yum clean all && \ |
44 | \ | 46 | \ |
45 | \ | 47 | \ |
diff --git a/centos7-onbuild/Dockerfile b/centos7-onbuild/Dockerfile index 9274bee..4edadbc 100644 --- a/centos7-onbuild/Dockerfile +++ b/centos7-onbuild/Dockerfile | |||
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..." && \ | |||
41 | \ | 41 | \ |
42 | \ | 42 | \ |
43 | echo "===> Adding Ansible's prerequisites..." && \ | 43 | echo "===> Adding Ansible's prerequisites..." && \ |
44 | yum -y install gcc python-devel python-pip && \ | 44 | yum -y install gcc python-devel python-pip \ |
45 | libffi-devel openssl-devel && \ | ||
45 | pip install --upgrade pip && \ | 46 | pip install --upgrade pip && \ |
46 | \ | 47 | \ |
47 | \ | 48 | \ |
48 | echo "===> Installing Ansible..." && \ | 49 | echo "===> Installing Ansible..." && \ |
49 | pip install ansible && \ | 50 | pip install --upgrade ansible && \ |
50 | \ | 51 | \ |
51 | \ | 52 | \ |
52 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 53 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..." && \ | |||
54 | \ | 55 | \ |
55 | \ | 56 | \ |
56 | echo "===> Removing unused YUM resources..." && \ | 57 | echo "===> Removing unused YUM resources..." && \ |
57 | yum -y remove epel-release gcc python-devel python-pip && \ | 58 | yum -y remove epel-release gcc python-devel python-pip \ |
59 | libffi-devel openssl-devel || true && \ | ||
58 | yum clean all && \ | 60 | yum clean all && \ |
59 | \ | 61 | \ |
60 | \ | 62 | \ |
diff --git a/centos7/Dockerfile b/centos7/Dockerfile index 0f2112d..6ea7e84 100644 --- a/centos7/Dockerfile +++ b/centos7/Dockerfile | |||
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..." && \ | |||
41 | \ | 41 | \ |
42 | \ | 42 | \ |
43 | echo "===> Adding Ansible's prerequisites..." && \ | 43 | echo "===> Adding Ansible's prerequisites..." && \ |
44 | yum -y install gcc python-devel python-pip && \ | 44 | yum -y install gcc python-devel python-pip \ |
45 | libffi-devel openssl-devel && \ | ||
45 | pip install --upgrade pip && \ | 46 | pip install --upgrade pip && \ |
46 | \ | 47 | \ |
47 | \ | 48 | \ |
48 | echo "===> Installing Ansible..." && \ | 49 | echo "===> Installing Ansible..." && \ |
49 | pip install ansible && \ | 50 | pip install --upgrade ansible && \ |
50 | \ | 51 | \ |
51 | \ | 52 | \ |
52 | echo "===> Disabling sudo 'requiretty' setting..." && \ | 53 | echo "===> Disabling sudo 'requiretty' setting..." && \ |
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..." && \ | |||
54 | \ | 55 | \ |
55 | \ | 56 | \ |
56 | echo "===> Removing unused YUM resources..." && \ | 57 | echo "===> Removing unused YUM resources..." && \ |
57 | yum -y remove epel-release gcc python-devel python-pip && \ | 58 | yum -y remove epel-release gcc python-devel python-pip \ |
59 | libffi-devel openssl-devel || true && \ | ||
58 | yum clean all && \ | 60 | yum clean all && \ |
59 | \ | 61 | \ |
60 | \ | 62 | \ |
@@ -7,6 +7,7 @@ dependencies: | |||
7 | - docker info | 7 | - docker info |
8 | - docker version | 8 | - docker version |
9 | 9 | ||
10 | - docker build -t ansible_xenial ubuntu16.04 | ||
10 | - docker build -t ansible_trusty ubuntu14.04 | 11 | - docker build -t ansible_trusty ubuntu14.04 |
11 | - docker build -t ansible_precise ubuntu12.04 | 12 | - docker build -t ansible_precise ubuntu12.04 |
12 | - docker build -t ansible_jessie debian8 | 13 | - docker build -t ansible_jessie debian8 |
@@ -15,6 +16,7 @@ dependencies: | |||
15 | - docker build -t ansible_centos6 centos6 | 16 | - docker build -t ansible_centos6 centos6 |
16 | - docker build -t ansible_alpine3 alpine3 | 17 | - docker build -t ansible_alpine3 alpine3 |
17 | 18 | ||
19 | - docker build -t ansible_xenial_onbuild ubuntu16.04-onbuild | ||
18 | - docker build -t ansible_trusty_onbuild ubuntu14.04-onbuild | 20 | - docker build -t ansible_trusty_onbuild ubuntu14.04-onbuild |
19 | - docker build -t ansible_precise_onbuild ubuntu12.04-onbuild | 21 | - docker build -t ansible_precise_onbuild ubuntu12.04-onbuild |
20 | - docker build -t ansible_jessie_onbuild debian8-onbuild | 22 | - docker build -t ansible_jessie_onbuild debian8-onbuild |
@@ -41,6 +43,7 @@ dependencies: | |||
41 | - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild | 43 | - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild |
42 | 44 | ||
43 | 45 | ||
46 | - docker build -t ansible_master_xenial master-ubuntu16.04 | ||
44 | - docker build -t ansible_master_trusty master-ubuntu14.04 | 47 | - docker build -t ansible_master_trusty master-ubuntu14.04 |
45 | - docker build -t ansible_master_precise master-ubuntu12.04 | 48 | - docker build -t ansible_master_precise master-ubuntu12.04 |
46 | - docker build -t ansible_master_jessie master-debian8 | 49 | - docker build -t ansible_master_jessie master-debian8 |
@@ -48,6 +51,7 @@ dependencies: | |||
48 | - docker build -t ansible_master_centos7 master-centos7 | 51 | - docker build -t ansible_master_centos7 master-centos7 |
49 | - docker build -t ansible_master_centos6 master-centos6 | 52 | - docker build -t ansible_master_centos6 master-centos6 |
50 | 53 | ||
54 | - docker build -t ansible_master_xenial_onbuild master-ubuntu16.04-onbuild | ||
51 | - docker build -t ansible_master_trusty_onbuild master-ubuntu14.04-onbuild | 55 | - docker build -t ansible_master_trusty_onbuild master-ubuntu14.04-onbuild |
52 | - docker build -t ansible_master_precise_onbuild master-ubuntu12.04-onbuild | 56 | - docker build -t ansible_master_precise_onbuild master-ubuntu12.04-onbuild |
53 | - docker build -t ansible_master_jessie_onbuild master-debian8-onbuild | 57 | - docker build -t ansible_master_jessie_onbuild master-debian8-onbuild |
@@ -57,6 +61,7 @@ dependencies: | |||
57 | 61 | ||
58 | test: | 62 | test: |
59 | override: | 63 | override: |
64 | - docker run -i ansible_xenial > result-ubuntu16.04 | ||
60 | - docker run -i ansible_trusty > result-ubuntu14.04 | 65 | - docker run -i ansible_trusty > result-ubuntu14.04 |
61 | - docker run -i ansible_precise > result-ubuntu12.04 | 66 | - docker run -i ansible_precise > result-ubuntu12.04 |
62 | - docker run -i ansible_jessie > result-debian8 | 67 | - docker run -i ansible_jessie > result-debian8 |
@@ -64,6 +69,7 @@ test: | |||
64 | - docker run -i ansible_centos7 > result-centos7 | 69 | - docker run -i ansible_centos7 > result-centos7 |
65 | - docker run -i ansible_centos6 > result-centos6 | 70 | - docker run -i ansible_centos6 > result-centos6 |
66 | - docker run -i ansible_alpine3 > result-alpine3 | 71 | - docker run -i ansible_alpine3 > result-alpine3 |
72 | - docker run -i ansible_xenial_onbuild > result-ubuntu16.04-onbuild | ||
67 | - docker run -i ansible_trusty_onbuild > result-ubuntu14.04-onbuild | 73 | - docker run -i ansible_trusty_onbuild > result-ubuntu14.04-onbuild |
68 | - docker run -i ansible_precise_onbuild > result-ubuntu12.04-onbuild | 74 | - docker run -i ansible_precise_onbuild > result-ubuntu12.04-onbuild |
69 | - docker run -i ansible_jessie_onbuild > result-debian8-onbuild | 75 | - docker run -i ansible_jessie_onbuild > result-debian8-onbuild |
@@ -89,12 +95,14 @@ test: | |||
89 | - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild | 95 | - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild |
90 | 96 | ||
91 | 97 | ||
98 | - docker run -i ansible_master_xenial > result-master-ubuntu16.04 | ||
92 | - docker run -i ansible_master_trusty > result-master-ubuntu14.04 | 99 | - docker run -i ansible_master_trusty > result-master-ubuntu14.04 |
93 | - docker run -i ansible_master_precise > result-master-ubuntu12.04 | 100 | - docker run -i ansible_master_precise > result-master-ubuntu12.04 |
94 | - docker run -i ansible_master_jessie > result-master-debian8 | 101 | - docker run -i ansible_master_jessie > result-master-debian8 |
95 | - docker run -i ansible_master_wheezy > result-master-debian7 | 102 | - docker run -i ansible_master_wheezy > result-master-debian7 |
96 | - docker run -i ansible_master_centos7 > result-master-centos7 | 103 | - docker run -i ansible_master_centos7 > result-master-centos7 |
97 | - docker run -i ansible_master_centos6 > result-master-centos6 | 104 | - docker run -i ansible_master_centos6 > result-master-centos6 |
105 | - docker run -i ansible_master_xenial_onbuild > result-master-ubuntu16.04-onbuild | ||
98 | - docker run -i ansible_master_trusty_onbuild > result-master-ubuntu14.04-onbuild | 106 | - docker run -i ansible_master_trusty_onbuild > result-master-ubuntu14.04-onbuild |
99 | - docker run -i ansible_master_precise_onbuild > result-master-ubuntu12.04-onbuild | 107 | - docker run -i ansible_master_precise_onbuild > result-master-ubuntu12.04-onbuild |
100 | - docker run -i ansible_master_jessie_onbuild > result-master-debian8-onbuild | 108 | - docker run -i ansible_master_jessie_onbuild > result-master-debian8-onbuild |
@@ -105,6 +113,7 @@ test: | |||
105 | 113 | ||
106 | 114 | ||
107 | - echo "==> Validating the test results..." | 115 | - echo "==> Validating the test results..." |
116 | - sh -c "[ -s result-ubuntu16.04 ]" | ||
108 | - sh -c "[ -s result-ubuntu14.04 ]" | 117 | - sh -c "[ -s result-ubuntu14.04 ]" |
109 | - sh -c "[ -s result-ubuntu12.04 ]" | 118 | - sh -c "[ -s result-ubuntu12.04 ]" |
110 | - sh -c "[ -s result-debian8 ]" | 119 | - sh -c "[ -s result-debian8 ]" |
@@ -112,6 +121,7 @@ test: | |||
112 | - sh -c "[ -s result-centos7 ]" | 121 | - sh -c "[ -s result-centos7 ]" |
113 | - sh -c "[ -s result-centos6 ]" | 122 | - sh -c "[ -s result-centos6 ]" |
114 | - sh -c "[ -s result-alpine3 ]" | 123 | - sh -c "[ -s result-alpine3 ]" |
124 | - sh -c "[ -s result-ubuntu16.04-onbuild ]" | ||
115 | - sh -c "[ -s result-ubuntu14.04-onbuild ]" | 125 | - sh -c "[ -s result-ubuntu14.04-onbuild ]" |
116 | - sh -c "[ -s result-ubuntu12.04-onbuild ]" | 126 | - sh -c "[ -s result-ubuntu12.04-onbuild ]" |
117 | - sh -c "[ -s result-debian8-onbuild ]" | 127 | - sh -c "[ -s result-debian8-onbuild ]" |
@@ -135,12 +145,14 @@ test: | |||
135 | - sh -c "[ -s result-1.9-centos6-onbuild ]" | 145 | - sh -c "[ -s result-1.9-centos6-onbuild ]" |
136 | - sh -c "[ -s result-1.9-alpine3-onbuild ]" | 146 | - sh -c "[ -s result-1.9-alpine3-onbuild ]" |
137 | 147 | ||
148 | - sh -c "[ -s result-master-ubuntu16.04 ]" | ||
138 | - sh -c "[ -s result-master-ubuntu14.04 ]" | 149 | - sh -c "[ -s result-master-ubuntu14.04 ]" |
139 | - sh -c "[ -s result-master-ubuntu12.04 ]" | 150 | - sh -c "[ -s result-master-ubuntu12.04 ]" |
140 | - sh -c "[ -s result-master-debian8 ]" | 151 | - sh -c "[ -s result-master-debian8 ]" |
141 | - sh -c "[ -s result-master-debian7 ]" | 152 | - sh -c "[ -s result-master-debian7 ]" |
142 | - sh -c "[ -s result-master-centos7 ]" | 153 | - sh -c "[ -s result-master-centos7 ]" |
143 | - sh -c "[ -s result-master-centos6 ]" | 154 | - sh -c "[ -s result-master-centos6 ]" |
155 | - sh -c "[ -s result-master-ubuntu16.04-onbuild ]" | ||
144 | - sh -c "[ -s result-master-ubuntu14.04-onbuild ]" | 156 | - sh -c "[ -s result-master-ubuntu14.04-onbuild ]" |
145 | - sh -c "[ -s result-master-ubuntu12.04-onbuild ]" | 157 | - sh -c "[ -s result-master-ubuntu12.04-onbuild ]" |
146 | - sh -c "[ -s result-master-debian8-onbuild ]" | 158 | - sh -c "[ -s result-master-debian8-onbuild ]" |
diff --git a/compare-image-size.sh b/compare-image-size.sh index 9c7c5cd..6a8ae88 100755 --- a/compare-image-size.sh +++ b/compare-image-size.sh | |||
@@ -4,6 +4,7 @@ | |||
4 | declare -a IMAGES=( 'ansible/ubuntu14.04-ansible:stable' 'ansible/centos7-ansible:stable' \ | 4 | declare -a IMAGES=( 'ansible/ubuntu14.04-ansible:stable' 'ansible/centos7-ansible:stable' \ |
5 | "williamyeh/ansible:debian8-onbuild" \ | 5 | "williamyeh/ansible:debian8-onbuild" \ |
6 | "williamyeh/ansible:debian7-onbuild" \ | 6 | "williamyeh/ansible:debian7-onbuild" \ |
7 | "williamyeh/ansible:ubuntu16.04-onbuild" \ | ||
7 | "williamyeh/ansible:ubuntu14.04-onbuild" \ | 8 | "williamyeh/ansible:ubuntu14.04-onbuild" \ |
8 | "williamyeh/ansible:ubuntu12.04-onbuild" \ | 9 | "williamyeh/ansible:ubuntu12.04-onbuild" \ |
9 | "williamyeh/ansible:centos7-onbuild" \ | 10 | "williamyeh/ansible:centos7-onbuild" \ |
diff --git a/debian7-onbuild/Dockerfile b/debian7-onbuild/Dockerfile index fb823fd..a6e1a30 100644 --- a/debian7-onbuild/Dockerfile +++ b/debian7-onbuild/Dockerfile | |||
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | pip install --upgrade cffi && \ | ||
21 | \ | 22 | \ |
22 | \ | 23 | \ |
23 | echo "===> Installing Ansible..." && \ | 24 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 26 | \ |
26 | \ | 27 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 28 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 29 | apt-get -f -y --auto-remove remove \ |
30 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 31 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 32 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 33 | \ |
diff --git a/debian7/Dockerfile b/debian7/Dockerfile index 73ea5d9..25cc25b 100644 --- a/debian7/Dockerfile +++ b/debian7/Dockerfile | |||
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | pip install --upgrade cffi && \ | ||
21 | \ | 22 | \ |
22 | \ | 23 | \ |
23 | echo "===> Installing Ansible..." && \ | 24 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 26 | \ |
26 | \ | 27 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 28 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 29 | apt-get -f -y --auto-remove remove \ |
30 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 31 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 32 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 33 | \ |
diff --git a/debian8-onbuild/Dockerfile b/debian8-onbuild/Dockerfile index c5fc227..f21a6b0 100644 --- a/debian8-onbuild/Dockerfile +++ b/debian8-onbuild/Dockerfile | |||
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | apt-get -y --purge remove python-cffi && \ | ||
22 | pip install --upgrade cffi && \ | ||
21 | \ | 23 | \ |
22 | \ | 24 | \ |
23 | echo "===> Installing Ansible..." && \ | 25 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 27 | \ |
26 | \ | 28 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 29 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 30 | apt-get -f -y --auto-remove remove \ |
31 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 32 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 33 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 34 | \ |
diff --git a/debian8/Dockerfile b/debian8/Dockerfile index e7ead92..1a30239 100644 --- a/debian8/Dockerfile +++ b/debian8/Dockerfile | |||
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com> | |||
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ | 15 | RUN echo "===> Installing python, sudo, and supporting tools..." && \ |
16 | apt-get update && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install -y \ | 18 | apt-get install -y \ |
19 | python python-yaml sudo \ | 19 | python python-yaml sudo \ |
20 | curl gcc python-pip python-dev && \ | 20 | curl gcc python-pip python-dev libffi-dev libssl-dev && \ |
21 | apt-get -y --purge remove python-cffi && \ | ||
22 | pip install --upgrade cffi && \ | ||
21 | \ | 23 | \ |
22 | \ | 24 | \ |
23 | echo "===> Installing Ansible..." && \ | 25 | echo "===> Installing Ansible..." && \ |
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \ | |||
25 | \ | 27 | \ |
26 | \ | 28 | \ |
27 | echo "===> Removing unused APT resources..." && \ | 29 | echo "===> Removing unused APT resources..." && \ |
28 | apt-get -f -y --auto-remove remove gcc python-pip python-dev && \ | 30 | apt-get -f -y --auto-remove remove \ |
31 | gcc python-pip python-dev libffi-dev libssl-dev && \ | ||
29 | apt-get clean && \ | 32 | apt-get clean && \ |
30 | rm -rf /var/lib/apt/lists/* /tmp/* && \ | 33 | rm -rf /var/lib/apt/lists/* /tmp/* && \ |
31 | \ | 34 | \ |
diff --git a/master-centos6-onbuild/Dockerfile b/master-centos6-onbuild/Dockerfile index 4b8585d..091bad2 100644 --- a/master-centos6-onbuild/Dockerfile +++ b/master-centos6-onbuild/Dockerfile | |||
@@ -30,6 +30,7 @@ RUN echo "===> Installing EPEL..." && \ | |||
30 | yum -y install \ | 30 | yum -y install \ |
31 | gcc make \ | 31 | gcc make \ |
32 | python python-devel python-pip \ | 32 | python python-devel python-pip \ |
33 | libffi-devel openssl-devel \ | ||
33 | libxml2 libxml2-devel libxslt libxslt-devel \ | 34 | libxml2 libxml2-devel libxslt libxslt-devel \ |
34 | git sudo curl && \ | 35 | git sudo curl && \ |
35 | pip install --upgrade pip && \ | 36 | pip install --upgrade pip && \ |
@@ -58,9 +59,9 @@ RUN echo "===> Installing EPEL..." && \ | |||
58 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ | 59 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ |
59 | \ | 60 | \ |
60 | \ | 61 | \ |
61 | echo "===> Removing unused YUM resources..." && \ | 62 | echo "===> Removing unused YUM resources..." && \ |
62 | yum -y remove \ | 63 | yum -y remove epel-release gcc git python-devel python-pip \ |
63 | epel-release python-devel python-pip gcc git && \ | 64 | libffi-devel openssl-devel || true && \ |
64 | yum clean all && \ | 65 | yum clean all && \ |
65 | \ | 66 | \ |
66 | \ | 67 | \ |
diff --git a/master-centos6/Dockerfile b/master-centos6/Dockerfile index d90a08b..8469d65 100644 --- a/master-centos6/Dockerfile +++ b/master-centos6/Dockerfile | |||
@@ -30,6 +30,7 @@ RUN echo "===> Installing EPEL..." && \ | |||
30 | yum -y install \ | 30 | yum -y install \ |
31 | gcc make \ | 31 | gcc make \ |
32 | python python-devel python-pip \ | 32 | python python-devel python-pip \ |
33 | libffi-devel openssl-devel \ | ||
33 | libxml2 libxml2-devel libxslt libxslt-devel \ | 34 | libxml2 libxml2-devel libxslt libxslt-devel \ |
34 | git sudo curl && \ | 35 | git sudo curl && \ |
35 | pip install --upgrade pip && \ | 36 | pip install --upgrade pip && \ |
@@ -58,10 +59,10 @@ RUN echo "===> Installing EPEL..." && \ | |||
58 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ | 59 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ |
59 | \ | 60 | \ |
60 | \ | 61 | \ |
61 | echo "===> Removing unused YUM resources..." && \ | 62 | echo "===> Removing unused YUM resources..." && \ |
62 | yum -y remove \ | 63 | yum -y remove epel-release gcc git python-devel python-pip \ |
63 | epel-release python-devel python-pip gcc git && \ | 64 | libffi-devel openssl-devel || true && \ |
64 | yum clean all && \ | 65 | yum clean all && \ |
65 | \ | 66 | \ |
66 | \ | 67 | \ |
67 | echo "===> Adding hosts for convenience..." && \ | 68 | echo "===> Adding hosts for convenience..." && \ |
diff --git a/master-centos7-onbuild/Dockerfile b/master-centos7-onbuild/Dockerfile index 6d3fa21..24d4ca9 100644 --- a/master-centos7-onbuild/Dockerfile +++ b/master-centos7-onbuild/Dockerfile | |||
@@ -31,7 +31,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
31 | rm -f /lib/systemd/system/basic.target.wants/*; \ | 31 | rm -f /lib/systemd/system/basic.target.wants/*; \ |
32 | rm -f /lib/systemd/system/anaconda.target.wants/* && \ | 32 | rm -f /lib/systemd/system/anaconda.target.wants/* && \ |
33 | \ | 33 | \ |
34 | \ | 34 | \ |
35 | echo "===> Installing EPEL..." && \ | 35 | echo "===> Installing EPEL..." && \ |
36 | yum -y install epel-release && \ | 36 | yum -y install epel-release && \ |
37 | yum -y update && \ | 37 | yum -y update && \ |
@@ -45,6 +45,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
45 | yum -y install \ | 45 | yum -y install \ |
46 | gcc make \ | 46 | gcc make \ |
47 | python python-devel python-pip \ | 47 | python python-devel python-pip \ |
48 | libffi-devel openssl-devel \ | ||
48 | libxml2 libxml2-devel libxslt libxslt-devel \ | 49 | libxml2 libxml2-devel libxslt libxslt-devel \ |
49 | git sudo curl && \ | 50 | git sudo curl && \ |
50 | pip install --upgrade pip && \ | 51 | pip install --upgrade pip && \ |
@@ -73,10 +74,10 @@ RUN echo "===> Enabling systemd..." && \ | |||
73 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ | 74 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ |
74 | \ | 75 | \ |
75 | \ | 76 | \ |
76 | echo "===> Removing unused YUM resources..." && \ | 77 | echo "===> Removing unused YUM resources..." && \ |
77 | yum -y remove \ | 78 | yum -y remove epel-release gcc git python-devel python-pip \ |
78 | epel-release python-devel python-pip gcc git && \ | 79 | libffi-devel openssl-devel || true && \ |
79 | yum clean all && \ | 80 | yum clean all && \ |
80 | \ | 81 | \ |
81 | \ | 82 | \ |
82 | echo "===> Adding hosts for convenience..." && \ | 83 | echo "===> Adding hosts for convenience..." && \ |
@@ -87,7 +88,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
87 | # | 88 | # |
88 | # [Quote] https://hub.docker.com/_/centos/ | 89 | # [Quote] https://hub.docker.com/_/centos/ |
89 | # | 90 | # |
90 | # "In order to run a container with systemd, | 91 | # "In order to run a container with systemd, |
91 | # you will need to mount the cgroups volumes from the host. | 92 | # you will need to mount the cgroups volumes from the host. |
92 | # [...] | 93 | # [...] |
93 | # There have been reports that if you're using an Ubuntu host, | 94 | # There have been reports that if you're using an Ubuntu host, |
diff --git a/master-centos7/Dockerfile b/master-centos7/Dockerfile index 51dae60..75711d8 100644 --- a/master-centos7/Dockerfile +++ b/master-centos7/Dockerfile | |||
@@ -31,7 +31,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
31 | rm -f /lib/systemd/system/basic.target.wants/*; \ | 31 | rm -f /lib/systemd/system/basic.target.wants/*; \ |
32 | rm -f /lib/systemd/system/anaconda.target.wants/* && \ | 32 | rm -f /lib/systemd/system/anaconda.target.wants/* && \ |
33 | \ | 33 | \ |
34 | \ | 34 | \ |
35 | echo "===> Installing EPEL..." && \ | 35 | echo "===> Installing EPEL..." && \ |
36 | yum -y install epel-release && \ | 36 | yum -y install epel-release && \ |
37 | yum -y update && \ | 37 | yum -y update && \ |
@@ -45,6 +45,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
45 | yum -y install \ | 45 | yum -y install \ |
46 | gcc make \ | 46 | gcc make \ |
47 | python python-devel python-pip \ | 47 | python python-devel python-pip \ |
48 | libffi-devel openssl-devel \ | ||
48 | libxml2 libxml2-devel libxslt libxslt-devel \ | 49 | libxml2 libxml2-devel libxslt libxslt-devel \ |
49 | git sudo curl && \ | 50 | git sudo curl && \ |
50 | pip install --upgrade pip && \ | 51 | pip install --upgrade pip && \ |
@@ -73,10 +74,10 @@ RUN echo "===> Enabling systemd..." && \ | |||
73 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ | 74 | sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ |
74 | \ | 75 | \ |
75 | \ | 76 | \ |
76 | echo "===> Removing unused YUM resources..." && \ | 77 | echo "===> Removing unused YUM resources..." && \ |
77 | yum -y remove \ | 78 | yum -y remove epel-release gcc git python-devel python-pip \ |
78 | epel-release python-devel python-pip gcc git && \ | 79 | libffi-devel openssl-devel || true && \ |
79 | yum clean all && \ | 80 | yum clean all && \ |
80 | \ | 81 | \ |
81 | \ | 82 | \ |
82 | echo "===> Adding hosts for convenience..." && \ | 83 | echo "===> Adding hosts for convenience..." && \ |
@@ -87,7 +88,7 @@ RUN echo "===> Enabling systemd..." && \ | |||
87 | # | 88 | # |
88 | # [Quote] https://hub.docker.com/_/centos/ | 89 | # [Quote] https://hub.docker.com/_/centos/ |
89 | # | 90 | # |
90 | # "In order to run a container with systemd, | 91 | # "In order to run a container with systemd, |
91 | # you will need to mount the cgroups volumes from the host. | 92 | # you will need to mount the cgroups volumes from the host. |
92 | # [...] | 93 | # [...] |
93 | # There have been reports that if you're using an Ubuntu host, | 94 | # There have been reports that if you're using an Ubuntu host, |
diff --git a/master-debian7-onbuild/Dockerfile b/master-debian7-onbuild/Dockerfile index 1222020..e787e2d 100644 --- a/master-debian7-onbuild/Dockerfile +++ b/master-debian7-onbuild/Dockerfile | |||
@@ -12,14 +12,16 @@ FROM debian:wheezy | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | 12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> |
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | 15 | RUN echo "===> Adding Ansible's prerequisites..." && \ |
16 | apt-get update -y && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install --no-install-recommends -y -q \ | 18 | apt-get install --no-install-recommends -y -q \ |
19 | build-essential ca-certificates \ | 19 | build-essential ca-certificates \ |
20 | python-pip python-dev python-yaml \ | 20 | python-pip python-dev python-yaml \ |
21 | libffi-dev libssl-dev \ | ||
21 | libxml2-dev libxslt1-dev zlib1g-dev \ | 22 | libxml2-dev libxslt1-dev zlib1g-dev \ |
22 | git sudo curl && \ | 23 | git sudo curl && \ |
24 | pip install --upgrade cffi && \ | ||
23 | pip install --upgrade pyyaml jinja2 pycrypto && \ | 25 | pip install --upgrade pyyaml jinja2 pycrypto && \ |
24 | \ | 26 | \ |
25 | \ | 27 | \ |
@@ -40,11 +42,11 @@ RUN echo "===> Adding Ansible's prerequisites..." && \ | |||
40 | rm -rf /ansible && \ | 42 | rm -rf /ansible && \ |
41 | \ | 43 | \ |
42 | \ | 44 | \ |
43 | echo "===> Clean up..." && \ | 45 | echo "===> Clean up..." && \ |
44 | apt-get remove -y --auto-remove \ | 46 | apt-get remove -y --auto-remove \ |
45 | build-essential python-pip python-dev git && \ | 47 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ |
46 | apt-get clean && \ | 48 | apt-get clean && \ |
47 | rm -rf /var/lib/apt/lists/* && \ | 49 | rm -rf /var/lib/apt/lists/* && \ |
48 | \ | 50 | \ |
49 | \ | 51 | \ |
50 | echo "===> Adding hosts for convenience..." && \ | 52 | echo "===> Adding hosts for convenience..." && \ |
diff --git a/master-debian7/Dockerfile b/master-debian7/Dockerfile index 5c7f2c4..8a81696 100644 --- a/master-debian7/Dockerfile +++ b/master-debian7/Dockerfile | |||
@@ -12,14 +12,16 @@ FROM debian:wheezy | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | 12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> |
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | 15 | RUN echo "===> Adding Ansible's prerequisites..." && \ |
16 | apt-get update -y && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install --no-install-recommends -y -q \ | 18 | apt-get install --no-install-recommends -y -q \ |
19 | build-essential ca-certificates \ | 19 | build-essential ca-certificates \ |
20 | python-pip python-dev python-yaml \ | 20 | python-pip python-dev python-yaml \ |
21 | libffi-dev libssl-dev \ | ||
21 | libxml2-dev libxslt1-dev zlib1g-dev \ | 22 | libxml2-dev libxslt1-dev zlib1g-dev \ |
22 | git sudo curl && \ | 23 | git sudo curl && \ |
24 | pip install --upgrade cffi && \ | ||
23 | pip install --upgrade pyyaml jinja2 pycrypto && \ | 25 | pip install --upgrade pyyaml jinja2 pycrypto && \ |
24 | \ | 26 | \ |
25 | \ | 27 | \ |
@@ -40,11 +42,11 @@ RUN echo "===> Adding Ansible's prerequisites..." && \ | |||
40 | rm -rf /ansible && \ | 42 | rm -rf /ansible && \ |
41 | \ | 43 | \ |
42 | \ | 44 | \ |
43 | echo "===> Clean up..." && \ | 45 | echo "===> Clean up..." && \ |
44 | apt-get remove -y --auto-remove \ | 46 | apt-get remove -y --auto-remove \ |
45 | build-essential python-pip python-dev git && \ | 47 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ |
46 | apt-get clean && \ | 48 | apt-get clean && \ |
47 | rm -rf /var/lib/apt/lists/* && \ | 49 | rm -rf /var/lib/apt/lists/* && \ |
48 | \ | 50 | \ |
49 | \ | 51 | \ |
50 | echo "===> Adding hosts for convenience..." && \ | 52 | echo "===> Adding hosts for convenience..." && \ |
diff --git a/master-debian8-onbuild/Dockerfile b/master-debian8-onbuild/Dockerfile index 19d4934..c9ce493 100644 --- a/master-debian8-onbuild/Dockerfile +++ b/master-debian8-onbuild/Dockerfile | |||
@@ -12,14 +12,17 @@ FROM debian:jessie | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | 12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> |
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | 15 | RUN echo "===> Adding Ansible's prerequisites..." && \ |
16 | apt-get update -y && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install --no-install-recommends -y -q \ | 18 | apt-get install --no-install-recommends -y -q \ |
19 | build-essential ca-certificates \ | 19 | build-essential ca-certificates \ |
20 | python-pip python-dev python-yaml \ | 20 | python-pip python-dev python-yaml \ |
21 | libffi-dev libssl-dev \ | ||
21 | libxml2-dev libxslt1-dev zlib1g-dev \ | 22 | libxml2-dev libxslt1-dev zlib1g-dev \ |
22 | git sudo curl && \ | 23 | git sudo curl && \ |
24 | apt-get -y --purge remove python-cffi && \ | ||
25 | pip install --upgrade cffi && \ | ||
23 | pip install --upgrade pyyaml jinja2 pycrypto && \ | 26 | pip install --upgrade pyyaml jinja2 pycrypto && \ |
24 | \ | 27 | \ |
25 | \ | 28 | \ |
@@ -40,11 +43,11 @@ RUN echo "===> Adding Ansible's prerequisites..." && \ | |||
40 | rm -rf /ansible && \ | 43 | rm -rf /ansible && \ |
41 | \ | 44 | \ |
42 | \ | 45 | \ |
43 | echo "===> Clean up..." && \ | 46 | echo "===> Clean up..." && \ |
44 | apt-get remove -y --auto-remove \ | 47 | apt-get remove -y --auto-remove \ |
45 | build-essential python-pip python-dev git && \ | 48 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ |
46 | apt-get clean && \ | 49 | apt-get clean && \ |
47 | rm -rf /var/lib/apt/lists/* && \ | 50 | rm -rf /var/lib/apt/lists/* && \ |
48 | \ | 51 | \ |
49 | \ | 52 | \ |
50 | echo "===> Adding hosts for convenience..." && \ | 53 | echo "===> Adding hosts for convenience..." && \ |
diff --git a/master-debian8/Dockerfile b/master-debian8/Dockerfile index fcf957c..d18b0f8 100644 --- a/master-debian8/Dockerfile +++ b/master-debian8/Dockerfile | |||
@@ -12,14 +12,17 @@ FROM debian:jessie | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | 12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> |
13 | 13 | ||
14 | 14 | ||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | 15 | RUN echo "===> Adding Ansible's prerequisites..." && \ |
16 | apt-get update -y && \ | 16 | apt-get update -y && apt-get install --fix-missing && \ |
17 | DEBIAN_FRONTEND=noninteractive \ | 17 | DEBIAN_FRONTEND=noninteractive \ |
18 | apt-get install --no-install-recommends -y -q \ | 18 | apt-get install --no-install-recommends -y -q \ |
19 | build-essential ca-certificates \ | 19 | build-essential ca-certificates \ |
20 | python-pip python-dev python-yaml \ | 20 | python-pip python-dev python-yaml \ |
21 | libffi-dev libssl-dev \ | ||
21 | libxml2-dev libxslt1-dev zlib1g-dev \ | 22 | libxml2-dev libxslt1-dev zlib1g-dev \ |
22 | git sudo curl && \ | 23 | git sudo curl && \ |
24 | apt-get -y --purge remove python-cffi && \ | ||
25 | pip install --upgrade cffi && \ | ||
23 | pip install --upgrade pyyaml jinja2 pycrypto && \ | 26 | pip install --upgrade pyyaml jinja2 pycrypto && \ |
24 | \ | 27 | \ |
25 | \ | 28 | \ |
@@ -40,11 +43,11 @@ RUN echo "===> Adding Ansible's prerequisites..." && \ | |||
40 | rm -rf /ansible && \ | 43 | rm -rf /ansible && \ |
41 | \ | 44 | \ |
42 | \ | 45 | \ |
43 | echo "===> Clean up..." && \ | 46 | echo "===> Clean up..." && \ |
44 | apt-get remove -y --auto-remove \ | 47 | apt-get remove -y --auto-remove \ |
45 | build-essential python-pip python-dev git && \ | 48 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ |
46 | apt-get clean && \ | 49 | apt-get clean && \ |
47 | rm -rf /var/lib/apt/lists/* && \ | 50 | rm -rf /var/lib/apt/lists/* && \ |
48 | \ | 51 | \ |
49 | \ | 52 | \ |
50 | echo "===> Adding hosts for convenience..." && \ | 53 | echo "===> Adding hosts for convenience..." && \ |
diff --git a/master-ubuntu16.04-onbuild/Dockerfile b/master-ubuntu16.04-onbuild/Dockerfile new file mode 100644 index 0000000..bbd0029 --- /dev/null +++ b/master-ubuntu16.04-onbuild/Dockerfile | |||
@@ -0,0 +1,77 @@ | |||
1 | # Dockerfile for building Ansible image from source for Ubuntu 16.04 (Xenial), with as few additional software as possible. | ||
2 | # | ||
3 | # @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source | ||
4 | # | ||
5 | # Version 1.0 | ||
6 | # | ||
7 | |||
8 | |||
9 | # pull base image | ||
10 | FROM ubuntu:16.04 | ||
11 | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | ||
13 | |||
14 | |||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | ||
16 | apt-get update -y && \ | ||
17 | DEBIAN_FRONTEND=noninteractive \ | ||
18 | apt-get install --no-install-recommends -y -q \ | ||
19 | build-essential \ | ||
20 | python-pip python-dev python-yaml \ | ||
21 | libffi-dev libssl-dev \ | ||
22 | libxml2-dev libxslt1-dev zlib1g-dev \ | ||
23 | git && \ | ||
24 | pip install --upgrade wheel setuptools && \ | ||
25 | pip install --upgrade pyyaml jinja2 pycrypto && \ | ||
26 | \ | ||
27 | \ | ||
28 | echo "===> Downloading Ansible's source tree..." && \ | ||
29 | git clone git://github.com/ansible/ansible.git --recursive && \ | ||
30 | \ | ||
31 | \ | ||
32 | echo "===> Compiling Ansible..." && \ | ||
33 | cd ansible && \ | ||
34 | bash -c 'source ./hacking/env-setup' && \ | ||
35 | \ | ||
36 | \ | ||
37 | echo "===> Moving useful Ansible stuff to /opt/ansible ..." && \ | ||
38 | mkdir -p /opt/ansible && \ | ||
39 | mv /ansible/bin /opt/ansible/bin && \ | ||
40 | mv /ansible/lib /opt/ansible/lib && \ | ||
41 | mv /ansible/docs /opt/ansible/docs && \ | ||
42 | rm -rf /ansible && \ | ||
43 | \ | ||
44 | \ | ||
45 | echo "===> Clean up..." && \ | ||
46 | apt-get remove -y --auto-remove \ | ||
47 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ | ||
48 | apt-get clean && \ | ||
49 | rm -rf /var/lib/apt/lists/* && \ | ||
50 | \ | ||
51 | \ | ||
52 | echo "===> Adding hosts for convenience..." && \ | ||
53 | mkdir -p /etc/ansible && \ | ||
54 | echo 'localhost' > /etc/ansible/hosts | ||
55 | |||
56 | |||
57 | ENV PATH /opt/ansible/bin:$PATH | ||
58 | ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH | ||
59 | ENV MANPATH /opt/ansible/docs/man:$MANPATH | ||
60 | |||
61 | |||
62 | COPY ansible-playbook-wrapper /usr/local/bin/ | ||
63 | |||
64 | ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
65 | echo "===> Updating TLS certificates..." && \ | ||
66 | apt-get install -y openssl ca-certificates | ||
67 | |||
68 | ONBUILD WORKDIR /tmp | ||
69 | ONBUILD COPY . /tmp | ||
70 | ONBUILD RUN \ | ||
71 | echo "===> Diagnosis: host information..." && \ | ||
72 | ansible -c local -m setup all | ||
73 | |||
74 | |||
75 | |||
76 | # default command: display Ansible version | ||
77 | CMD [ "ansible-playbook", "--version" ] | ||
diff --git a/master-ubuntu16.04-onbuild/ansible-playbook-wrapper b/master-ubuntu16.04-onbuild/ansible-playbook-wrapper new file mode 100755 index 0000000..0ba45e6 --- /dev/null +++ b/master-ubuntu16.04-onbuild/ansible-playbook-wrapper | |||
@@ -0,0 +1,49 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Simple wrapper for executing ansible-galaxy and ansible-playbook | ||
4 | # with local connection. | ||
5 | # | ||
6 | # USAGE: | ||
7 | # ansible-playbook-wrapper [other ansible-playbook arguments] | ||
8 | # | ||
9 | # ENVIRONMENT VARIABLES: | ||
10 | # | ||
11 | # - REQUIREMENTS: requirements filename; default = "requirements.yml" | ||
12 | # - PLAYBOOK: playbook filename; default = "playbook.yml" | ||
13 | # - INVENTORY: inventory filename; default = "/etc/ansible/hosts" | ||
14 | # | ||
15 | |||
16 | |||
17 | # | ||
18 | # install Galaxy roles, if any | ||
19 | # | ||
20 | |||
21 | if [ -z "$REQUIREMENTS" ]; then | ||
22 | REQUIREMENTS=requirements.yml | ||
23 | fi | ||
24 | |||
25 | if [ -f "$REQUIREMENTS" ]; then | ||
26 | ansible-galaxy install -r $REQUIREMENTS | ||
27 | fi | ||
28 | |||
29 | |||
30 | # | ||
31 | # execute playbook | ||
32 | # | ||
33 | |||
34 | if [ -z "$PLAYBOOK" ]; then | ||
35 | PLAYBOOK=playbook.yml | ||
36 | fi | ||
37 | |||
38 | |||
39 | if [ -z "$INVENTORY" ]; then | ||
40 | exec ansible-playbook \ | ||
41 | $PLAYBOOK \ | ||
42 | --connection=local \ | ||
43 | "$@" | ||
44 | else | ||
45 | exec ansible-playbook \ | ||
46 | -i $INVENTORY $PLAYBOOK \ | ||
47 | --connection=local \ | ||
48 | "$@" | ||
49 | fi | ||
diff --git a/master-ubuntu16.04/Dockerfile b/master-ubuntu16.04/Dockerfile new file mode 100644 index 0000000..921af23 --- /dev/null +++ b/master-ubuntu16.04/Dockerfile | |||
@@ -0,0 +1,62 @@ | |||
1 | # Dockerfile for building Ansible image from source for Ubuntu 16.04 (Xenial), with as few additional software as possible. | ||
2 | # | ||
3 | # @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source | ||
4 | # | ||
5 | # Version 1.0 | ||
6 | # | ||
7 | |||
8 | |||
9 | # pull base image | ||
10 | FROM ubuntu:16.04 | ||
11 | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | ||
13 | |||
14 | |||
15 | RUN echo "===> Adding Ansible's prerequisites..." && \ | ||
16 | apt-get update -y && \ | ||
17 | DEBIAN_FRONTEND=noninteractive \ | ||
18 | apt-get install --no-install-recommends -y -q \ | ||
19 | build-essential \ | ||
20 | python-pip python-dev python-yaml \ | ||
21 | libffi-dev libssl-dev \ | ||
22 | libxml2-dev libxslt1-dev zlib1g-dev \ | ||
23 | git && \ | ||
24 | pip install --upgrade wheel setuptools && \ | ||
25 | pip install --upgrade pyyaml jinja2 pycrypto && \ | ||
26 | \ | ||
27 | \ | ||
28 | echo "===> Downloading Ansible's source tree..." && \ | ||
29 | git clone git://github.com/ansible/ansible.git --recursive && \ | ||
30 | \ | ||
31 | \ | ||
32 | echo "===> Compiling Ansible..." && \ | ||
33 | cd ansible && \ | ||
34 | bash -c 'source ./hacking/env-setup' && \ | ||
35 | \ | ||
36 | \ | ||
37 | echo "===> Moving useful Ansible stuff to /opt/ansible ..." && \ | ||
38 | mkdir -p /opt/ansible && \ | ||
39 | mv /ansible/bin /opt/ansible/bin && \ | ||
40 | mv /ansible/lib /opt/ansible/lib && \ | ||
41 | mv /ansible/docs /opt/ansible/docs && \ | ||
42 | rm -rf /ansible && \ | ||
43 | \ | ||
44 | \ | ||
45 | echo "===> Clean up..." && \ | ||
46 | apt-get remove -y --auto-remove \ | ||
47 | build-essential python-pip python-dev git libffi-dev libssl-dev && \ | ||
48 | apt-get clean && \ | ||
49 | rm -rf /var/lib/apt/lists/* && \ | ||
50 | \ | ||
51 | \ | ||
52 | echo "===> Adding hosts for convenience..." && \ | ||
53 | mkdir -p /etc/ansible && \ | ||
54 | echo 'localhost' > /etc/ansible/hosts | ||
55 | |||
56 | |||
57 | ENV PATH /opt/ansible/bin:$PATH | ||
58 | ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH | ||
59 | ENV MANPATH /opt/ansible/docs/man:$MANPATH | ||
60 | |||
61 | # default command: display Ansible version | ||
62 | CMD [ "ansible-playbook", "--version" ] | ||
diff --git a/ubuntu16.04-onbuild/Dockerfile b/ubuntu16.04-onbuild/Dockerfile new file mode 100644 index 0000000..cc28d8c --- /dev/null +++ b/ubuntu16.04-onbuild/Dockerfile | |||
@@ -0,0 +1,45 @@ | |||
1 | # Dockerfile for building Ansible image for Ubuntu 16.04 (Xenial), with as few additional software as possible. | ||
2 | # | ||
3 | # @see https://launchpad.net/~ansible/+archive/ubuntu/ansible | ||
4 | # | ||
5 | # Version 1.0 | ||
6 | # | ||
7 | |||
8 | |||
9 | # pull base image | ||
10 | FROM ubuntu:16.04 | ||
11 | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | ||
13 | |||
14 | |||
15 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
16 | \ | ||
17 | \ | ||
18 | echo "===> Installing Ansible..." && \ | ||
19 | apt-get install -y ansible && \ | ||
20 | \ | ||
21 | \ | ||
22 | echo "===> Clean up..." && \ | ||
23 | rm -rf /var/lib/apt/lists/* && \ | ||
24 | \ | ||
25 | \ | ||
26 | echo "===> Adding hosts for convenience..." && \ | ||
27 | echo 'localhost' > /etc/ansible/hosts | ||
28 | |||
29 | |||
30 | COPY ansible-playbook-wrapper /usr/local/bin/ | ||
31 | |||
32 | ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
33 | echo "===> Updating TLS certificates..." && \ | ||
34 | apt-get install -y openssl ca-certificates | ||
35 | |||
36 | ONBUILD WORKDIR /tmp | ||
37 | ONBUILD COPY . /tmp | ||
38 | ONBUILD RUN \ | ||
39 | echo "===> Diagnosis: host information..." && \ | ||
40 | ansible -c local -m setup all | ||
41 | |||
42 | |||
43 | |||
44 | # default command: display Ansible version | ||
45 | CMD [ "ansible-playbook", "--version" ] | ||
diff --git a/ubuntu16.04-onbuild/ansible-playbook-wrapper b/ubuntu16.04-onbuild/ansible-playbook-wrapper new file mode 100755 index 0000000..0ba45e6 --- /dev/null +++ b/ubuntu16.04-onbuild/ansible-playbook-wrapper | |||
@@ -0,0 +1,49 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Simple wrapper for executing ansible-galaxy and ansible-playbook | ||
4 | # with local connection. | ||
5 | # | ||
6 | # USAGE: | ||
7 | # ansible-playbook-wrapper [other ansible-playbook arguments] | ||
8 | # | ||
9 | # ENVIRONMENT VARIABLES: | ||
10 | # | ||
11 | # - REQUIREMENTS: requirements filename; default = "requirements.yml" | ||
12 | # - PLAYBOOK: playbook filename; default = "playbook.yml" | ||
13 | # - INVENTORY: inventory filename; default = "/etc/ansible/hosts" | ||
14 | # | ||
15 | |||
16 | |||
17 | # | ||
18 | # install Galaxy roles, if any | ||
19 | # | ||
20 | |||
21 | if [ -z "$REQUIREMENTS" ]; then | ||
22 | REQUIREMENTS=requirements.yml | ||
23 | fi | ||
24 | |||
25 | if [ -f "$REQUIREMENTS" ]; then | ||
26 | ansible-galaxy install -r $REQUIREMENTS | ||
27 | fi | ||
28 | |||
29 | |||
30 | # | ||
31 | # execute playbook | ||
32 | # | ||
33 | |||
34 | if [ -z "$PLAYBOOK" ]; then | ||
35 | PLAYBOOK=playbook.yml | ||
36 | fi | ||
37 | |||
38 | |||
39 | if [ -z "$INVENTORY" ]; then | ||
40 | exec ansible-playbook \ | ||
41 | $PLAYBOOK \ | ||
42 | --connection=local \ | ||
43 | "$@" | ||
44 | else | ||
45 | exec ansible-playbook \ | ||
46 | -i $INVENTORY $PLAYBOOK \ | ||
47 | --connection=local \ | ||
48 | "$@" | ||
49 | fi | ||
diff --git a/ubuntu16.04/Dockerfile b/ubuntu16.04/Dockerfile new file mode 100644 index 0000000..cd27d3a --- /dev/null +++ b/ubuntu16.04/Dockerfile | |||
@@ -0,0 +1,30 @@ | |||
1 | # Dockerfile for building Ansible image for Ubuntu 16.04 (Xenial), with as few additional software as possible. | ||
2 | # | ||
3 | # @see https://launchpad.net/~ansible/+archive/ubuntu/ansible | ||
4 | # | ||
5 | # Version 1.0 | ||
6 | # | ||
7 | |||
8 | |||
9 | # pull base image | ||
10 | FROM ubuntu:16.04 | ||
11 | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | ||
13 | |||
14 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
15 | \ | ||
16 | \ | ||
17 | echo "===> Installing Ansible..." && \ | ||
18 | apt-get install -y ansible && \ | ||
19 | \ | ||
20 | \ | ||
21 | echo "===> Clean up..." && \ | ||
22 | rm -rf /var/lib/apt/lists/* && \ | ||
23 | \ | ||
24 | \ | ||
25 | echo "===> Adding hosts for convenience..." && \ | ||
26 | echo 'localhost' > /etc/ansible/hosts | ||
27 | |||
28 | |||
29 | # default command: display Ansible version | ||
30 | CMD [ "ansible-playbook", "--version" ] | ||