-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile.py26.tests
52 lines (39 loc) · 1.55 KB
/
Dockerfile.py26.tests
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
FROM lovato/python-2.6
# SETUP SYSTEM PACKAGES
RUN apt-get update && apt-get -y install git wget build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev
# PREPARE PY2.6
RUN wget https://github.com/pypa/setuptools/archive/bootstrap-2.x.tar.gz && \
tar -xvf bootstrap-2.x.tar.gz && \
cd setuptools-bootstrap-2.x && \
python2.6 setup.py install
RUN wget https://github.com/pypa/pip/archive/9.0.3.tar.gz && \
tar -xvf 9.0.3.tar.gz && \
cd pip-9.0.3 && \
python2.6 setup.py install
# CLONE ANSIBLE
COPY requirements.txt /requirements.txt
RUN pip download $(grep ^ansible /requirements.txt) --no-cache-dir --no-deps -d /tmp/pip && \
mkdir /tmp/ansible && \
tar -C /tmp/ansible -xf /tmp/pip/ansible* && \
mv /tmp/ansible/ansible* /ansible && \
rm -rf /tmp/pip /tmp/ansible
# INSTALL ANSIBLE REQUIREMENTS
RUN python2.6 /usr/local/bin/pip install pycparser==2.18 idna==2.7 cryptography==2.0 lxml==4.2.6 && \
python2.6 /usr/local/bin/pip install \
--disable-pip-version-check \
-c /ansible/test/runner/requirements/constraints.txt \
-r /ansible/test/runner/requirements/units.txt
# INSTALL FTD-ANSIBLE REQUIREMENTS
COPY test-requirements.txt /test-requirements.txt
RUN python2.6 /usr/local/bin/pip install \
--disable-pip-version-check \
--no-cache-dir \
-c /ansible/test/runner/requirements/constraints.txt \
-r /test-requirements.txt \
-r /requirements.txt
# SETUP ENV
ENV PYTHONPATH="$PYTHONPATH:/ansible/lib:/ansible/test"
COPY . /ftd-ansible
WORKDIR /ftd-ansible
ENTRYPOINT ["pytest"]
CMD ["test"]