Byparr/Dockerfile

32 lines
899 B
Docker
Raw Normal View History

2024-11-24 22:13:47 +00:00
FROM python:3.12-slim
2024-10-18 13:30:00 +00:00
# Inspired by https://github.com/Hudrolax/uc-docker-alpine/
2024-10-27 18:46:19 +00:00
ARG GITHUB_BUILD=false
ENV GITHUB_BUILD=${GITHUB_BUILD}
2024-11-24 22:00:58 +00:00
ENV HOME=/root
2024-07-25 00:04:00 +00:00
ENV \
DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
2024-07-24 15:52:30 +00:00
# prevents python creating .pyc files
PYTHONDONTWRITEBYTECODE=1 \
# do not ask any interactive question
2024-07-24 23:00:51 +00:00
POETRY_NO_INTERACTION=1 \
2024-10-18 13:30:00 +00:00
POETRY_VIRTUALENVS_IN_PROJECT=true \
DISPLAY=:0
2024-07-24 15:52:30 +00:00
2024-11-24 22:00:58 +00:00
WORKDIR /app
EXPOSE 8191
2024-11-24 22:13:47 +00:00
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb ./
RUN apt update &&\
apt install -y xvfb scrot python3-tk curl ./google-chrome-stable_current_amd64.deb &&\
rm ./google-chrome-stable_current_amd64.deb
2024-11-24 22:00:58 +00:00
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="${HOME}/.local/bin:$PATH"
2024-07-24 23:09:03 +00:00
COPY pyproject.toml poetry.lock ./
RUN poetry install
2024-07-24 15:52:30 +00:00
2024-09-13 18:28:36 +00:00
COPY . .
2024-11-24 22:00:58 +00:00
CMD [". .venv/bin/activate && python3 main.py"]