-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox-dockerfile
51 lines (51 loc) · 1.5 KB
/
tox-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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
ENV HOME=/home/bingo
ENV PYTHON_VERSIONS="3.6.15 3.7.15 3.8.15 3.9.15 3.10.8 3.11.0"
ENV DEFAULT_VERSION="3.11.0"
RUN mkdir ${HOME}
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
make \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm \
libncurses5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
git \
ca-certificates \
libffi-dev \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb
RUN git clone https://github.com/pyenv/pyenv ${HOME}/.pyenv
RUN echo "#!/bin/bash" > ${HOME}/run-tox
RUN for PVER in ${PYTHON_VERSIONS}; do \
set -ex \
&& ${HOME}/.pyenv/bin/pyenv install ${PVER} \
&& ${HOME}/.pyenv/versions/${PVER}/bin/python -m pip install --upgrade pip \
&& echo "export PATH=\${HOME}/.pyenv/versions/${PVER}/bin:\${PATH}" >> ${HOME}/run-tox \
; done
RUN ${HOME}/.pyenv/versions/${DEFAULT_VERSION}/bin/pip3 install tox
RUN echo ${HOME}/.pyenv/versions/${DEFAULT_VERSION}/bin/tox '$*' >> ${HOME}/run-tox
RUN chmod +x ${HOME}/run-tox
WORKDIR ${HOME}
COPY requirements.txt ${HOME}
COPY dev-requirements.txt ${HOME}
COPY tox.ini ${HOME}
COPY .pylintrc ${HOME}
COPY musicbingo ${HOME}/musicbingo
COPY Extra-Files ${HOME}/Extra-Files
VOLUME ${HOME}.tox
RUN ${HOME}/run-tox --notest
ENTRYPOINT ["/home/bingo/run-tox"]