forked from UDST/ansible-conda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
28 lines (21 loc) · 834 Bytes
/
Dockerfile.test
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
FROM ubuntu
ENV DATA_DIRECTORY=/ansible-conda
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python \
python-pip \
python-apt \
python-dev \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
RUN pip install setuptools wheel
RUN pip install ansible==2.3.2.0
ADD tests/requirements.yml /tmp/requirements.yml
RUN ansible-galaxy install -r /tmp/requirements.yml
ADD tests/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
VOLUME "${DATA_DIRECTORY}"
CMD ansible-galaxy install -r "${DATA_DIRECTORY}/tests/requirements.yml" \
&& pip install -r "${DATA_DIRECTORY}/tests/requirements.txt" \
&& ansible-playbook -vvv -e ansible_python_interpreter=$(which python) -c local "${DATA_DIRECTORY}/tests/site.yml"