Skip to content

Commit 319000b

Browse files
authored
Renamed user from app to modmail
- 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]>
1 parent eb7995d commit 319000b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ FROM python:3.10 as py
33
FROM py as build
44

55
RUN apt update && apt install -y g++ git
6+
67
COPY requirements.txt /
78
RUN pip install --prefix=/inst -U -r /requirements.txt
89

910
FROM py
1011

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

14+
ENV USING_DOCKER yes
15+
RUN useradd --system --no-create-home modmail
16+
USER modmail
17+
1418
WORKDIR /modmailbot
1519
CMD ["python", "bot.py"]
16-
COPY . /modmailbot
17-
RUN adduser --disabled-password --gecos '' app && \
18-
chown -R app /modmailbot
19-
USER app
20+
COPY --chown=modmail:modmail . /modmailbot

0 commit comments

Comments
 (0)