summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2024-03-04 11:24:51 +0100
committernicolargo <nicolas@nicolargo.com>2024-03-04 11:24:51 +0100
commit0b7e29347651b4f398c19521d6b0c67e6f33364c (patch)
tree6af161b2cece18544e7b72660244df46998242a0
parenta71f2b63672206d3f524bae8002677ce10aebacc (diff)
Use a venv-build environment for Alpine image
-rw-r--r--docker-files/alpine.Dockerfile9
-rw-r--r--docker-files/ubuntu.Dockerfile2
2 files changed, 5 insertions, 6 deletions
diff --git a/docker-files/alpine.Dockerfile b/docker-files/alpine.Dockerfile
index 3fe9b19d..1f10075f 100644
--- a/docker-files/alpine.Dockerfile
+++ b/docker-files/alpine.Dockerfile
@@ -52,7 +52,8 @@ RUN apk add --no-cache \
libffi-dev \
openssl-dev
-RUN python${PYTHON_VERSION} -m pip --version
+RUN python${PYTHON_VERSION} -m venv venv-build
+RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --upgrade pip
RUN python${PYTHON_VERSION} -m venv --without-pip venv
@@ -62,7 +63,7 @@ COPY requirements.txt docker-requirements.txt webui-requirements.txt optional-re
# BUILD: Install the minimal image deps
FROM build as buildMinimal
-RUN python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \
+RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \
# Note: requirements.txt is include by dep
-r docker-requirements.txt \
-r webui-requirements.txt
@@ -76,7 +77,7 @@ ARG CASS_DRIVER_NO_CYTHON=1
# See issue 2368
ARG CARGO_NET_GIT_FETCH_WITH_CLI=true
-RUN python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \
+RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \
# Note: requirements.txt is include by dep
-r optional-requirements.txt
@@ -122,4 +123,4 @@ FROM full as dev
# Forward access and error logs to Docker's log collector
RUN ln -sf /dev/stdout /tmp/glances-root.log \
- && ln -sf /dev/stderr /var/log/error.log \
+ && ln -sf /dev/stderr /var/log/error.log \ No newline at end of file
diff --git a/docker-files/ubuntu.Dockerfile b/docker-files/ubuntu.Dockerfile
index 6fd559e3..be5bc09d 100644
--- a/docker-files/ubuntu.Dockerfile
+++ b/docker-files/ubuntu.Dockerfile
@@ -49,8 +49,6 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-RUN python${PYTHON_VERSION} -m pip --version
-
RUN python${PYTHON_VERSION} -m venv --without-pip venv
COPY requirements.txt docker-requirements.txt webui-requirements.txt optional-requirements.txt ./