-
Notifications
You must be signed in to change notification settings - Fork 190
/
dev.Dockerfile
25 lines (21 loc) · 1003 Bytes
/
dev.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
FROM ubuntu:22.04
ENV PYENV_ROOT="/opt/.pyenv" \
PATH="/opt/pipx/bin:/opt/.pyenv/shims:/opt/.pyenv/bin:$PATH" \
PIPX_HOME="/opt/pipx" \
PIPX_BIN_DIR="/opt/pipx/bin"
RUN mkdir $PIPX_HOME \
&& apt-get update \
&& apt-get install -y ccache build-essential git curl libssl-dev libz-dev libbz2-dev libncurses-dev libffi-dev libsqlite3-dev liblzma-dev libreadline-dev \
&& curl https://pyenv.run | bash \
&& git clone https://github.com/pyenv/pyenv-ccache.git $(pyenv root)/plugins/pyenv-ccache \
# NOTE: 3.3 installation fails with a segmentation fault :(
# NOTE: 3.4 installation fails: cannot find libssl (while it is installed)
&& pyenv install 2.7 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 \
# enable all versions, 3.12 is default
&& pyenv global 3.12 2.7 3.5 3.6 3.7 3.8 3.9 3.10 3.11 \
&& pip install pipx \
&& pipx install tox>=4 \
&& pipx install poetry \
&& pipx install pre-commit \
&& ccache -C \
&& rm -rf /var/lib/apt/lists/*