-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
77 lines (66 loc) · 1.75 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Pull base image
FROM alpine:3.6
LABEL Description="Concourse Ansible resource" Vendor="SpringerNature Platform Engineering" Version="1.0"
MAINTAINER SpringerNature Platform Engineering [email protected]
# Base packages
# Build dependencies
RUN ln -s /lib /lib64 \
&& \
apk --upgrade add --no-cache \
bash \
sudo \
curl \
zip \
jq \
xmlsec \
yaml \
libc6-compat \
python3 \
libxml2 \
py-lxml \
py-pip \
openssl \
ca-certificates \
openssh-client \
rsync \
git \
&& \
apk --upgrade add --no-cache --virtual \
build-dependencies \
build-base \
python3-dev \
libffi-dev \
openssl-dev \
linux-headers \
libxml2-dev
# Ansible installation
ADD requirements.txt /opt/
RUN pip3 install --upgrade --no-cache-dir -r /opt/requirements.txt
RUN apk del \
build-dependencies \
build-base \
python3-dev \
libffi-dev \
openssl-dev \
linux-headers \
libxml2-dev \
&& \
rm -rf /var/cache/apk/*
RUN mkdir -p ~/.ssh
RUN echo $'Host *\nStrictHostKeyChecking no' > ~/.ssh/config
RUN chmod 400 ~/.ssh/config
# Default config
COPY ansible/ /etc/ansible/
# Install tests
COPY tests/ /opt/resource/tests/
# install resource assets
COPY assets/ /opt/resource/
# install tests
#ADD scripts/* /tmp/
#RUN /tmp/install_test.sh
# test
#RUN /tmp/test.sh
#RUN /tmp/cleanup_test.sh
# default command: display local setup
CMD ["ansible", "-c", "local", "-m", "setup", "all"]
# CMD [ "ansible-playbook", "--version" ]