Skip to content

Commit 94cb5b2

Browse files
feat: Install pipx into system site packages (#28)
And configure it to have venvs at `/opt/pipx/venvs`, while installing library binaries into `/opt/pipx/bin`. Also bump pip, poetry, and stuff to latest versions.
1 parent c3bfe29 commit 94cb5b2

File tree

3 files changed

+39
-19
lines changed

3 files changed

+39
-19
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 5.2.0 (2022-02-16)
2+
3+
- **BREAKING CHANGE:** Do not install `pipx` into user site-packages, install it into the system site-packages and configure to use `/opt/pipx` for venvs and binaries
4+
- Update `py310` image to Python 3.10.2
5+
- Update `py39` image to Python 3.9.10
6+
- Update pip to 22.0.3
7+
- Update pipx to 1.0.0
8+
- Update poetry to 1.1.13
9+
- Update pre-commit to 2.17.0
10+
- Update tox to 3.24.5
11+
- Update virtualenv to 20.13.1
12+
113
# 5.1.0 (2021-12-19)
214

315
- Update `py310` image to Python 3.10.1

Dockerfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,29 @@ RUN apt-get update -qq \
2323
&& rm -rf /var/lib/apt/lists/* \
2424
&& apt-get autoremove -y
2525

26-
# Update path to include `/root/.local/bin` for `pip install --user ...` and
27-
# `pipx` needs
28-
ENV PATH="/root/.local/bin:${PATH}"
26+
# Setup pipx and update `PATH` to include `/opt/pipx/bin` for applications
27+
# installed via `pipx`
28+
ENV PIPX_HOME="/opt/pipx/venvs"
29+
ENV PIPX_BIN_DIR="/opt/pipx/bin"
30+
ENV PATH="${PIPX_BIN_DIR}:${PATH}"
2931

30-
# Update pip to latest version, install pipx & virtualen into user directory,
31-
# and install additional dev-tools via pipx into `~/.local`
32+
# Update pip to latest version, install pipx & virtualenv into the system,
33+
# and install additional dev-tools via pipx into `PIPX_BIN_DIR`
3234
#
3335
# To check latest versions,
3436
#
3537
# ```bash
3638
# pip-latest-release pip pipx poetry pre-commit tox virtualenv
3739
# ```
38-
ENV PIP_VERSION="21.3.1"
39-
ENV PIPX_VERSION="0.16.4"
40-
ENV POETRY_VERSION="1.1.12"
41-
ENV PRE_COMMIT_VERSION="2.16.0"
42-
ENV TOX_VERSION="3.24.4"
43-
ENV VIRTUALENV_VERSION="20.10.0"
40+
#
41+
ENV PIP_VERSION="22.0.3"
42+
ENV PIPX_VERSION="1.0.0"
43+
ENV POETRY_VERSION="1.1.13"
44+
ENV PRE_COMMIT_VERSION="2.17.0"
45+
ENV TOX_VERSION="3.24.5"
46+
ENV VIRTUALENV_VERSION="20.13.1"
4447

45-
RUN python3 -m pip install --no-cache-dir pip==${PIP_VERSION} \
46-
&& python3 -m pip install --no-cache-dir --user pipx==${PIPX_VERSION} virtualenv==${VIRTUALENV_VERSION} \
48+
RUN python3 -m pip install --no-cache-dir pip==${PIP_VERSION} pipx==${PIPX_VERSION} virtualenv==${VIRTUALENV_VERSION} \
4749
&& python3 -m pipx install --pip-args=--no-cache-dir poetry==${POETRY_VERSION} \
4850
&& python3 -m pipx install --pip-args=--no-cache-dir pre-commit==${PRE_COMMIT_VERSION} \
4951
&& python3 -m pipx install --pip-args=--no-cache-dir tox==${TOX_VERSION}

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ FROM playpauseandstop/docker-python:5.0.0
1313

1414
### Included dev-tools
1515

16-
- [pip](https://pip.pypa.io) 21.3.1
17-
- [pipx](https://pypa.github.io/pipx/) 0.16.4
18-
- [poetry](https://python-poetry.org) 1.1.12
19-
- [pre-commit](https://pre-commit.com) 2.16.0
20-
- [tox](https://tox.readthedocs.io/) 3.24.2
21-
- [virtualenv](https://virtualenv.pypa.io) 20.10.0
16+
- [pip](https://pip.pypa.io) 22.0.3
17+
- [pipx](https://pypa.github.io/pipx/) 1.0.0
18+
- [poetry](https://python-poetry.org) 1.1.13
19+
- [pre-commit](https://pre-commit.com) 2.17.0
20+
- [tox](https://tox.readthedocs.io/) 3.24.5
21+
- [virtualenv](https://virtualenv.pypa.io) 20.13.1
2222
- [curl](https://curl.haxx.se) 7.74.0
2323
- [gcc & g++](https://gcc.gnu.org) 10.2.1
2424
- [git](https://git-scm.com) 2.30.2
@@ -36,6 +36,12 @@ By default, `docker-python` image uses latest stable Python version. But some ot
3636

3737
List of supported Python versions are (`<PY_VERSION>` -> base Docker image)
3838

39+
#### 5.2.0
40+
41+
- `py310` -> `python:3.10.2-slim-bullseye`
42+
- `py39` -> `python:3.9.10-slim-bullseye`
43+
- `py38`, `py37` & `py36` use same base image as in `5.0.0`
44+
3945
#### 5.1.0
4046

4147
- `py310` -> `python:3.10.1-slim-bullseye`

0 commit comments

Comments
 (0)