3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-07-06 13:37:28 +02:00

Non-root user.

This commit is contained in:
Alex Belanger 2024-03-11 19:04:02 -04:00
parent 46b131ef74
commit cfe820933b
No known key found for this signature in database
GPG Key ID: 31736D2B10A5F158

View File

@ -11,8 +11,12 @@ RUN cd /opt/pbot && cpanm -n --installdeps . --with-all-features --without-featu
# Mount point to persist the bot's data.
RUN mkdir /mnt/persistent
# Prefer a non-root user to run the bot.
RUN useradd -ms /bin/bash pbot
USER pbot
# Just in case files are created in the working directory.
WORKDIR /tmp
WORKDIR /home/pbot
# Executable.
ENTRYPOINT /opt/pbot/bin/pbot
ENTRYPOINT /opt/pbot/bin/pbot