-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathTestDockerfile
39 lines (31 loc) · 1.9 KB
/
TestDockerfile
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
# A dockerfile based on our .travis.yml
# Useful for running the tests locally
# in a self contained environment
FROM python:2-slim
RUN apt-get update && apt-get install -y gnupg2
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list \
&& echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 \
&& apt-get update && \
mkdir -p /usr/share/man/man1/ \
&& apt-get install -y software-properties-common && \
(echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections) && \
apt-get install -y oracle-java8-set-default && \
apt-get clean && \
rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Deps
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y --force-yes expect git wget libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 python curl libqt5widgets5
# update some packages
RUN apt-get install -y ca-certificates && update-ca-certificates
RUN apt-get install -y --no-install-recommends build-essential python-dev libpq-dev libevent-dev libmagic-dev zip unzip \
&& apt-get clean && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN wget https://oss.sonatype.org/content/repositories/releases/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar
COPY test-requirements.txt /indexd/test-requirements.txt
COPY requirements.txt /indexd/requirements.txt
WORKDIR /indexd
RUN pip install -r test-requirements.txt && pip install -r requirements.txt
COPY . /indexd
RUN java -jar /swagger-codegen-cli-2.3.1.jar generate -i openapis/swagger.yaml -l python -o swagger_client \
&& cd swagger_client; python setup.py install; cd .. \
&& python setup.py install --force \
&& pwd && py.test -vv tests