forked from akatrevorjay/circleci-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
78 lines (66 loc) · 1.38 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
ARG BOILERPLATE_PARENT_IMAGE="trevorj/boilerplate"
ARG BOILERPLATE_PARENT_TAG="rolling"
##
## Python base
##
FROM $BOILERPLATE_PARENT_IMAGE:$BOILERPLATE_PARENT_TAG AS python
RUN set -exv \
&& cleanup=no lazy-apt software-properties-common \
&& apt-add-repository -y ppa:deadsnakes/ppa \
&& image-cleanup \
&& :
ARG PYTHON=python3.6
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
VIRTUAL_ENV="/venv"
ENV PATH="$APP_PATH:$VIRTUAL_ENV/bin:$IMAGE_PATH:$PATH"
RUN set -exv \
&& py="${PYTHON%2}" \
&& py_major="${py%%.*}" \
\
&& lazy-apt \
${py} \
${py}-dev \
\
${py_major}-pip \
${py_major}-wheel \
${py_major}-virtualenv \
virtualenv \
\
python-pip \
python3.7-dev \
\
&& virtualenv -p "$(which "$PYTHON")" "${VIRTUAL_ENV:?}" \
&& pip install -U pip setuptools wheel \
\
&& :
##
## builder
##
FROM python AS builder
RUN lazy-apt \
build-essential \
autoconf autoconf-archive pkg-config automake m4 libtool \
\
libssl-dev \
zlib1g-dev \
\
patch \
git \
\
bats \
shunit2 \
\
zsh
COPY build.d build.d
RUN build-parts build.d
RUN set -exv \
&& for py in 2.7 3.6 3.7; do \
py=python$py \
&& $py -m pip install -U \
coverage \
coveralls \
pytest \
pytest-cov \
tox \
; done