-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
29 lines (23 loc) · 1003 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
29
FROM mercury/python-subrepo
ENV INSTALL_DIRECTORY=/tmp
RUN git config --global user.email "example@example.com" \
&& git config --global user.name example
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
rsync \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Note: Need to install newer version of git than that available for Jessie
RUN echo "deb http://ftp.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i '$ d' /etc/apt/sources.list
RUN pip install --disable-pip-version-check ansible>=2.4
ADD test_requirements.txt ${INSTALL_DIRECTORY}
ADD requirements.txt ${INSTALL_DIRECTORY}
RUN pip install coverage \
&& pip install -U -r ${INSTALL_DIRECTORY}/test_requirements.txt \
&& pip install -U -r ${INSTALL_DIRECTORY}/requirements.txt
RUN rm ${INSTALL_DIRECTORY}/*requirements.txt