From a2d7916530bd9250603ec198f0da47a5ee2e45f5 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 11 Mar 2026 19:24:05 +0000
Subject: [PATCH] Fix compatibility with newer pip, which requires venv
---
config.json | 2 +-
Dockerfile | 4 ++--
package.sh | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 98b66ff..e259eef 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,8 +8,8 @@
WORKDIR /usr/src/app
COPY --chown=nobody:nobody requirements.txt .
-RUN pip3 install --user --no-cache-dir -r requirements.txt
+RUN python -m venv venv && ./venv/bin/pip install --no-cache-dir -r requirements.txt
COPY --chown=nobody:nobody . .
-CMD [ "./run.py" ]
+CMD [ "./venv/bin/python", "run.py" ]
diff --git a/config.json b/config.json
index 683359c..c3a46d7 100644
--- a/config.json
+++ b/config.json
@@ -2,7 +2,7 @@
"description": "pyIPAM - IPAM driver in Python",
"documentation": "https://github.com/jacekkow/docker-plugin-pyipam",
"workdir": "/usr/src/app",
- "entrypoint": ["./run.py"],
+ "entrypoint": ["./venv/bin/python", "./run.py"],
"env": [
{
"name": "ENVIRONMENT",
diff --git a/package.sh b/package.sh
index b89e2f3..014a7ad 100755
--- a/package.sh
+++ b/package.sh
@@ -14,7 +14,7 @@
docker rm -vf "${id}"
docker plugin disable "${NAME}"
docker plugin rm "${NAME}"
-sudo chmod 755 rootfs rootfs/usr/src/app/.local && sudo chmod -R o=g rootfs/usr/src
+sudo chmod 755 rootfs && sudo chmod -R o=g rootfs/usr/src
for VERSION in ${VERSIONS}; do
sudo docker plugin create "${NAME}:${VERSION}" .
done
--
Gitblit v1.10.0