From e522282179029ac79481464f7e5bd936837d327f Mon Sep 17 00:00:00 2001 From: T Date: Fri, 1 Feb 2019 16:22:52 +0100 Subject: [PATCH] use requirements.txt to fix python package versions Resolve issue with `docker run` not having correct privilege Closes thiagoralves/OpenPLC_v3#22 --- Dockerfile | 2 +- README.md | 2 +- requirements.txt | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 53a7043..d92a8a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM debian RUN apt-get update && apt-get install -y build-essential pkg-config bison flex autoconf automake libtool make git python2.7 python-pip sqlite3 cmake git -RUN pip install flask flask-login pyserial COPY . /workdir +RUN pip install -r /workdir/requirements.txt RUN cd /workdir && ./install.sh docker WORKDIR /workdir ENTRYPOINT ["./start_openplc.sh"] diff --git a/README.md b/README.md index 62277d0..74eba53 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,6 @@ docker build -t openplc:v3 . _Devices can be passed to the `docker` daemon using the `-v` flag (e.g. `-v /dev/ttyACM0:/dev/ttyACM0`)_ ```bash -docker run -it --rm -p 8080:8080 openplc:v3 +docker run -it --rm --privileged -p 8080:8080 openplc:v3 ``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6bba21c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,21 @@ +Click==7.0 +cryptography==1.7.1 +enum34==1.1.6 +Flask==1.0.2 +Flask-Login==0.4.1 +idna==2.2 +ipaddress==1.0.17 +itsdangerous==1.1.0 +Jinja2==2.10 +keyring==10.1 +keyrings.alt==1.3 +MarkupSafe==1.1.0 +pyasn1==0.1.9 +pycrypto==2.6.1 +pygobject==3.22.0 +pyserial==3.4 +pyxdg==0.25 +SecretStorage==2.3.1 +six==1.10.0 +Werkzeug==0.14.1 +