We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11fa372 commit 21e78d2Copy full SHA for 21e78d2
1 file changed
connector-definition/Dockerfile
@@ -4,16 +4,18 @@ COPY requirements.txt /functions/
4
5
WORKDIR /functions
6
7
-RUN python3 -m venv venv && \
8
- . venv/bin/activate && \
9
- pip install -r requirements.txt
10
-
11
-COPY ./ /functions
12
13
# create the group and user
14
RUN adduser -u 1000 python
15
16
RUN chown -R python:python /functions
17
18
-# stating USER before WORKDIR means the directory is created with the non-root proper ownership
19
-USER python
+# Switch to python user before activating venv - the alternative is to run chown on installed
+# dependencies afterward, which takes a long time.
+USER python
+
+RUN python3 -m venv venv && \
+ . venv/bin/activate && \
+ pip install --upgrade pip>=25.3 && \
+ pip install -r requirements.txt
20
21
+COPY --chown=python:python ./ /functions
0 commit comments