Skip to content

Commit

Permalink
Fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Dec 20, 2023
1 parent 3b0ffc0 commit 74cca6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ docker-compose.yml
Procfile
pyproject.toml
README.md
Pipfile
Pipfile.lock
#Pipfile
#Pipfile.lock
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM python:3.10 as py
FROM python:3.10

FROM py as build
RUN apt update && apt install -y g++ git && pip install --upgrade pip

RUN apt update && apt install -y g++ git
RUN useradd modmail
USER modmail
WORKDIR /home/modmail

RUN pip install --user pipenv

COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt
ENV PATH="/home/modmail/.local/bin:${PATH}"

FROM py
COPY --chown=modmail:modmail Pipfile Pipfile.lock ./
RUN pipenv install

COPY --from=build /inst /usr/local
COPY --chown=modmail:modmail . .

ENV USING_DOCKER yes
RUN useradd --system --no-create-home modmail
USER modmail

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY --chown=modmail:modmail . /modmailbot
CMD ["pipenv", "run", "bot"]

0 comments on commit 74cca6a

Please sign in to comment.