From e91e5e35801e36f65c1f910a3a157d0d409a7036 Mon Sep 17 00:00:00 2001 From: XdoctorwhoZ Date: Mon, 27 Nov 2023 08:39:38 +0100 Subject: [PATCH] fix container --- platform/Dockerfile | 14 ++++++-------- platform/scripts/docker.bash.sh | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100755 platform/scripts/docker.bash.sh diff --git a/platform/Dockerfile b/platform/Dockerfile index 4dfd116..b973f64 100644 --- a/platform/Dockerfile +++ b/platform/Dockerfile @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.source https://github.com/Panduza/panduza-py # Install Packages RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris \ apt-get -y install \ - python3 python3-pip \ + python3.11 python3-pip \ git # Append udev and libusb for device autodetection @@ -15,19 +15,18 @@ RUN apt-get -y install libusb-1.0-0 # Pip installations COPY requirements.txt /setup/requirements.txt -RUN pip3 install -r /setup/requirements.txt +RUN python3.11 -m pip install -r /setup/requirements.txt # Create the mirror directory RUN mkdir -p /etc/panduza -# +# Install platform inside WORKDIR /setup COPY . /setup/ -RUN pip install . -# RUN cp -v ./deploy/pza-py-platform-run.py /usr/local/bin/pza-py-platform-run.py +RUN python3.11 -m pip install . # Allow plugin insertion here -ENV PYTHONPATH="/etc/panduza/plugins/py" +# ENV PYTHONPATH="/etc/panduza/plugins/py" # WORKDIR /work @@ -35,5 +34,4 @@ WORKDIR /work # Create the directory for platform plugins # Then run the platform CMD mkdir -p /etc/panduza/plugins/py; \ - python3 /usr/local/lib/python3.10/dist-packages/panduza_platform/__main__.py - + python3.11 /usr/local/lib/python3.11/dist-packages/panduza_platform/__main__.py diff --git a/platform/scripts/docker.bash.sh b/platform/scripts/docker.bash.sh new file mode 100755 index 0000000..849dc0f --- /dev/null +++ b/platform/scripts/docker.bash.sh @@ -0,0 +1,2 @@ + +docker run -it local/panduza-py-platform:latest bash