tpotce/docker/wordpot/Dockerfile

51 lines
1.3 KiB
Text
Raw Normal View History

2024-12-05 17:13:16 +00:00
FROM alpine:3.20 AS builder
2022-02-09 19:13:18 +00:00
#
# Include dist
2022-03-14 21:50:19 +00:00
COPY dist/ /root/dist/
#
2022-02-09 19:13:18 +00:00
# Install packages
2024-12-05 17:13:16 +00:00
RUN apk --no-cache -U upgrade && \
apk --no-cache -U add \
build-base \
git \
libcap \
py3-click \
py3-flask \
py3-itsdangerous \
py3-jinja2 \
py3-markupsafe \
py3-pip \
py3-ua-parser \
py3-werkzeug \
py3-yaml \
python3 \
2024-12-05 17:13:16 +00:00
python3-dev
2022-02-09 19:13:18 +00:00
#
# Install wordpot from GitHub and setup
2024-12-05 17:13:16 +00:00
RUN mkdir -p /opt && \
2022-02-09 19:13:18 +00:00
cd /opt/ && \
git clone https://github.com/t3chn0m4g3/wordpot && \
cd wordpot && \
2024-12-05 17:13:16 +00:00
git checkout b2701cb6c7057ed2843187c0c425bb8c13845719 && \
cp /root/dist/requirements.txt .
WORKDIR /opt/wordpot
RUN pip3 install --no-cache-dir --break-system-packages pyinstaller
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
RUN pyinstaller wordpot.py \
--hidden-import hpfeeds \
--add-data "./wordpot/static:./wordpot/static" \
--add-data "./wordpot/templates:./wordpot/templates" \
--add-data "./wordpot/plugins:./wordpot/plugins" \
--add-data "./wordpot.conf:./"
RUN ls -alR
2022-02-09 19:13:18 +00:00
#
2024-12-05 17:13:16 +00:00
FROM alpine:3.20
RUN apk --no-cache -U upgrade
COPY --from=builder /opt/wordpot/dist /opt/
2022-02-09 19:13:18 +00:00
#
# Start wordpot
STOPSIGNAL SIGINT
2024-12-05 17:13:16 +00:00
USER 2000:2000
WORKDIR /opt/wordpot/
CMD ["./wordpot", "--host", "0.0.0.0", "--port", "80", "--title", "Wordpress"]