Skip to content

Commit 5268ff3

Browse files
authored
refactor: finalize pip-tools Docker wrapper (#260)
1 parent 1ff8ea6 commit 5268ff3

File tree

1 file changed

+8
-7
lines changed
  • docs/user-guide/requirements/pip-compile

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# check=error=true
33

4+
# BusyBox command help: https://www.busybox.net/downloads/BusyBox.html
45
# Note: impossible to rely on v3.13.14 (missing 'cache_clear' function error)
56
FROM docker.io/python:3.12.11-alpine@sha256:c610e4a94a0e8b888b4b225bfc0e6b59dee607b1e61fb63ff3926083ff617216
67

7-
# BusyBox command help: https://www.busybox.net/downloads/BusyBox.html
8-
RUN addgroup -S pip && \
9-
adduser -S -G pip pip
8+
# New user and group for pip
9+
RUN addgroup -S -g 1000 pip && \
10+
adduser -S -u 1000 -G pip pip
1011

11-
USER pip
12+
USER 1000:1000
1213

13-
WORKDIR /home/pip/
14+
ENV HOME=/home/pip
15+
ENV PATH="${PATH}:${HOME}/.local/bin"
1416

15-
ENV PATH="${PATH}:/home/pip/.local/bin"
17+
WORKDIR ${HOME}
1618

17-
# Long story short: install pip-tools in the user directory to avoid permission issues.
1819
RUN pip install --user pip-tools

0 commit comments

Comments
 (0)