-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (26 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM archlinux:latest
ENV PYTHONUNBUFFERED 1
RUN pacman -Syyuu --noconfirm base-devel git unrar unzip atool vim tmux sqlite
RUN pacman -Syyuu --noconfirm chromium optipng imagemagick
RUN pacman -Syyuu --noconfirm pyenv
RUN useradd -ms /bin/bash danboorutools
USER danboorutools
ENV PYTHON_USER danboorutools
ENV PYENV_ROOT /home/${PYTHON_USER}/.pyenv
ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}
ENV PYTHON_VERSION 3.12
RUN pyenv install ${PYTHON_VERSION}
RUN pyenv global ${PYTHON_VERSION}
RUN pyenv rehash
RUN which python
RUN python3 --version
RUN pip install -U pip poetry
WORKDIR /code
COPY --chown=danboorutools:danboorutools poetry.lock pyproject.toml /code/
COPY --chown=danboorutools:danboorutools danboorutools /code/danboorutools
RUN mkdir /code/screenshots /code/cookies
RUN mkdir /home/danboorutools/.ipython
RUN poetry install --no-interaction --no-ansi
ENV SHELL /bin/bash
ENV TERM xterm-256color
CMD poetry run watchmedo auto-restart -d /code/danboorutools -p="*" -R -- celery -- -A danboorutools.celery_tasks.tasks worker -B --loglevel=INFO -s /tmp/celerybeat-schedule