@@ -9,15 +9,30 @@
# docker build -f contrib/hashserv/Dockerfile .
#
-FROM alpine:3.13.1
+FROM alpine:3.18.4
-RUN apk add --no-cache python3
+RUN apk add --no-cache \
+ python3 \
+ py3-virtualenv \
+ py3-pip
-COPY bin/bitbake-hashserv /opt/bbhashserv/bin/
-COPY lib/hashserv /opt/bbhashserv/lib/hashserv/
-COPY lib/bb /opt/bbhashserv/lib/bb/
-COPY lib/codegen.py /opt/bbhashserv/lib/codegen.py
-COPY lib/ply /opt/bbhashserv/lib/ply/
-COPY lib/bs4 /opt/bbhashserv/lib/bs4/
+# Setup virtual environment
+RUN mkdir /opt/hashserver
+WORKDIR /opt/hashserver
-ENTRYPOINT ["/opt/bbhashserv/bin/bitbake-hashserv"]
+ENV VIRTUAL_ENV=/opt/hashserver/venv
+RUN python3 -m venv $VIRTUAL_ENV
+ENV PATH="$VIRTUAL_ENV/bin:$PATH"
+RUN pip install -U pip
+
+COPY contrib/hashserv/requirements.txt .
+RUN pip install -r requirements.txt && rm requirements.txt
+
+COPY bin/bitbake-hashserv ./bin/
+COPY lib/hashserv ./lib/hashserv/
+COPY lib/bb ./lib/bb/
+COPY lib/codegen.py ./lib/
+COPY lib/ply ./lib/ply/
+COPY lib/bs4 ./lib/bs4/
+
+ENTRYPOINT ["./bin/bitbake-hashserv"]
new file mode 100644
@@ -0,0 +1,5 @@
+websockets==11.0.3
+sqlalchemy==2.0.21
+sqlalchemy[asyncio]==2.0.21
+aiosqlite==0.19.0
+asyncpg==0.28.0
Updates the hash equivalence docker file to the latest Alpine version, and also to install the required python modules into a virtual environment Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- bitbake/contrib/hashserv/Dockerfile | 33 ++++++++++++++++------- bitbake/contrib/hashserv/requirements.txt | 5 ++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 bitbake/contrib/hashserv/requirements.txt