-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 1.13 KB
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
FROM debian:trixie
ENV PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
awscli \
gcc \
git \
gnupg \
curl \
ca-certificates \
jq \
# pyenv dependencies (https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
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 libffi-dev liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl https://pyenv.run | bash
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN ls /root/.pyenv/bin
RUN eval "$(/root/.pyenv/bin/pyenv init - )"
WORKDIR /var/project
COPY tox-python-versions .
RUN xargs -a tox-python-versions -n 1 -P $(nproc) pyenv install
COPY . .
# Make pyenv activate all installed Python versions for tox (available as pythonX.Y)
# The first version in the file will be the one used when running "python"
RUN pyenv global $(tr '\n' ' ' < tox-python-versions)
RUN make bootstrap
RUN pip install tox