forked from ikalnytskyi/pythonista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (39 loc) · 1.4 KB
/
Dockerfile
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
#######################################################################
# Dockerfile for building Pythonista docker image.
#
# Copyright (c) 2014, Igor Kalnitsky <[email protected]>
# Licensed under 3-clause BSD
#
# See https://github.com/ikalnitsky/pythonista for details.
#######################################################################
FROM debian:stretch
MAINTAINER Igor Kalnitsky <[email protected]>
ADD get-python.sh /var/tmp/get-python.sh
# Install CPython interpreters.
#
# NOTE: We're going to install 2.7 and 3.5 first because we want to
# make more rational defaults for pip and python.
RUN ["/bin/bash", "/var/tmp/get-python.sh", \
"2.7.11", \
"3.5.1", \
"3.3.6", \
"3.4.4", \
"pypy-portable-5.0.1", \
"pypy3-portable-2.4"]
# Unfortunately, there's no way (at least I don't know one) to
# change PATH variable inside container. The only way I know is
# to setup it directly in Dockerfile, but it's awful when the
# PATH should be changed dynamically based on some third-party
# input. But I have no choice... :(
#
# Also, I use one ENV statement in order to avoid creation of
# unneccessary extra Docker layers.
ENV PATH /opt/python/2.7.11/bin\
:/opt/python/3.5.1/bin\
:/opt/python/3.3.6/bin\
:/opt/python/3.4.4/bin\
:/opt/python/pypy-portable-5.0.1/bin\
:/opt/python/pypy3-portable-2.4/bin\
:$PATH
# Install first-class tools
RUN pip install tox virtualenv