1
1
FROM ubuntu:xenial
2
+
3
+ WORKDIR /root
4
+
2
5
ENV PYTHON_VERSIONS='python2.7 python3.4 python3.5 python3.6' \
3
- OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json"
6
+ OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json" \
7
+ DEBIAN_FRONTEND=noninteractive
4
8
5
- # install testing versions of python, including old versions, from deadsnakes
9
+ # Install testing versions of python, including old versions, from deadsnakes
6
10
RUN set -x \
7
11
&& apt-get update \
8
12
&& apt-get install -y --no-install-recommends software-properties-common \
@@ -14,35 +18,29 @@ RUN set -x \
14
18
&& apt-get purge -y --auto-remove software-properties-common \
15
19
&& rm -rf /var/lib/apt/lists/*
16
20
17
- WORKDIR /root
18
-
19
- # install Prism
21
+ # Install Prism
20
22
ADD https://raw.githubusercontent.com/stoplightio/prism/master/install.sh install.sh
21
- RUN chmod +x ./install.sh && sync && \
22
- ./install.sh && \
23
- rm ./install.sh
23
+ RUN sync && bash install.sh
24
24
25
- # install pip, tox
25
+ # Install pip, tox
26
26
ADD https://bootstrap.pypa.io/get-pip.py get-pip.py
27
- RUN python2.7 get-pip.py && \
28
- pip install tox && \
29
- rm get-pip.py
27
+ RUN python2.7 get-pip.py && pip install tox
30
28
31
- # install pyyaml, six, werkzeug
32
- RUN python3.6 -m pip install pyyaml
33
- RUN python3.6 -m pip install six
34
- RUN Python3.6 -m pip install werkzeug
35
- RUN Python3.6 -m pip install flask
29
+ # Install pyyaml, six, werkzeug
30
+ RUN python3.6 -m pip install pyyaml six werkzeug flask
36
31
37
- # set up default sendgrid env
32
+ # Set up default SendGrid env
38
33
WORKDIR /root/sources
39
- RUN git clone https://github.com/sendgrid/sendgrid-python.git && \
40
- git clone https://github.com/sendgrid/python-http-client.git
34
+
35
+ RUN git clone https://github.com/sendgrid/sendgrid-python.git \
36
+ && git clone https://github.com/sendgrid/python-http-client.git
37
+
41
38
WORKDIR /root
42
- RUN ln -s /root/sources/sendgrid-python/sendgrid && \
43
- ln -s /root/sources/python-http-client/python_http_client
39
+
40
+ RUN ln -s /root/sources/sendgrid-python/sendgrid \
41
+ && ln -s /root/sources/python-http-client/python_http_client
44
42
45
43
COPY entrypoint.sh entrypoint.sh
46
- RUN chmod +x entrypoint.sh
44
+
47
45
ENTRYPOINT ["./entrypoint.sh" ]
48
46
CMD ["--mock" ]
0 commit comments