-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbionic.Dockerfile
63 lines (57 loc) · 1.54 KB
/
bionic.Dockerfile
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
### Dockerfile for building an Ansible image suitable for automated testing.
# Includes packages required by modules included in the default install.
FROM ubuntu:bionic
MAINTAINER Shaun Martin <[email protected]>
ENV WORKDIR /workspace
VOLUME $WORKDIR
WORKDIR $WORKDIR
ARG VERSION
ENV PKG_CMD "apt update && apt install -y"
ENV GPG_PK ""
ENV GIT_CRYPT_VERSION 0.6.0
ENV GPG_TTY /dev/console
RUN echo "### Installing system packages..." \
&& apt update \
&& apt upgrade -y \
&& apt install -y \
curl \
g++ \
gcc \
git \
libffi-dev \
libxslt1.1 \
libssl-dev \
make \
openssl \
python-dev \
sshpass \
sudo \
&& apt-get clean \
&& echo "### Installing pip and PyPI packages..." \
&& curl https://bootstrap.pypa.io/get-pip.py | python \
&& pip install --upgrade \
pyyaml \
jinja2 \
pycrypto \
paramiko \
httplib2 \
boto \
boto3 \
ansible~="$VERSION.0" \
&& rm -rf /root/.cache/pip \
&& echo "### Installing git-crypt..." \
&& git clone --branch $GIT_CRYPT_VERSION --single-branch \
https://github.com/AGWA/git-crypt.git /tmp/git-crypt \
&& cd /tmp/git-crypt \
&& make \
&& make install \
&& echo "### Disabling 'requiretty' in sudoers..." \
&& sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers \
&& echo "### Adding 'localhost' to /etc/ansible/hosts..." \
&& mkdir -p /etc/ansible \
&& echo 'localhost' > /etc/ansible/hosts
ADD start.sh /
RUN echo "### Making start.sh executable..." \
&& chmod +x /start.sh
ADD VERSION /
CMD ["/start.sh"]