Skip to content

Commit

Permalink
Renamed user from app to modmail
Browse files Browse the repository at this point in the history
- Rename the user from 'app' to 'modmail', and made it a system user instead.
- Moved user creation to a higher layer in the Dockerfile.


Signed-off-by: Taku <[email protected]>
  • Loading branch information
Taaku18 authored Jul 9, 2023
1 parent eb7995d commit 319000b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ FROM python:3.10 as py
FROM py as build

RUN apt update && apt install -y g++ git

COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt

FROM py

ENV USING_DOCKER yes
COPY --from=build /inst /usr/local

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

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY . /modmailbot
RUN adduser --disabled-password --gecos '' app && \
chown -R app /modmailbot
USER app
COPY --chown=modmail:modmail . /modmailbot

0 comments on commit 319000b

Please sign in to comment.