Skip to content

Commit 08b7c12

Browse files
committed
Dockerfile minor improvements
1 parent d2645af commit 08b7c12

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11 as builder
1+
FROM python:3.13 AS builder
22
LABEL maintainer="Angelo Dell'Aera"
33
WORKDIR /home
44

@@ -27,16 +27,17 @@ RUN git clone https://github.com/buffer/libemu.git && \
2727
make install && \
2828
cd ..
2929
COPY thug/conf thug/conf
30-
RUN pip wheel --no-cache-dir --wheel-dir /tmp/wheels thug pytesseract pygraphviz
30+
RUN pip install --no-cache-dir -U cffi
31+
RUN BUILD_LIB=1 pip wheel --no-cache-dir --wheel-dir /tmp/wheels thug pytesseract pygraphviz
3132

3233
# HACK: this is to have the pylibemu wheel package statically linked with the libemu library
3334
RUN apt-get install -y patchelf
3435
RUN pip install --no-cache-dir -U auditwheel
35-
RUN auditwheel repair --plat linux_x86_64 -w /tmp/wheelhouse /tmp/wheels/*pylibemu*
36+
RUN auditwheel repair --plat auto -w /tmp/wheelhouse /tmp/wheels/*pylibemu*
3637
RUN rm /tmp/wheels/*pylibemu*
3738
RUN mv /tmp/wheelhouse/* /tmp/wheels/
3839

39-
FROM python:3.11-slim
40+
FROM python:3.13-slim
4041
LABEL maintainer="Angelo Dell'Aera"
4142

4243
RUN groupadd -r thug && \
@@ -56,8 +57,8 @@ RUN --mount=type=bind,from=builder,src=/home/thug/conf,dst=/tmp/thug/conf cp -R
5657
RUN --mount=type=bind,from=builder,src=/tmp/wheels,dst=/tmp/wheels pip install --no-cache-dir --no-deps /tmp/wheels/*
5758

5859
USER thug
59-
ENV HOME /home/thug
60-
ENV USER thug
60+
ENV HOME=/home/thug
61+
ENV USER=thug
6162
WORKDIR /home/thug
6263
VOLUME ["/tmp/thug/logs"]
6364
CMD ["thug"]

0 commit comments

Comments
 (0)