whois_web/Dockerfile

22 lines
454 B
Text
Raw Permalink Normal View History

2023-12-08 11:18:42 +01:00
FROM debian:bookworm
EXPOSE 5000
RUN \
apt update && \
apt -y install \
python3-pip \
python3-venv \
whois
SHELL ["/bin/bash", "-c"]
WORKDIR /code
RUN chown daemon /code
USER daemon
ADD --chown=daemon whois.py .
ADD --chown=daemon requirements.txt .
RUN python3 -m venv _env && \
source _env/bin/activate && \
pip install -r requirements.txt
ENTRYPOINT [ "/code/_env/bin/flask", "--app", "whois.py", "run", "--host=0.0.0.0" ]