mirror of https://github.com/pragma-/pbot.git
Proper users.
This commit is contained in:
parent
f1d9570917
commit
568ebb6c56
|
@ -11,7 +11,7 @@ RUN apt-get install -y libfribidi0 libfribidi-bin gawk libsigsegv2 translate-she
|
|||
RUN useradd -ms /bin/bash pbot
|
||||
|
||||
# Location for perl libraries.
|
||||
RUN su -u pbot cpanm --local-lib=/home/pbot/perl5 local::lib && eval $(perl -I /home/pbot/perl5/lib/perl5/ -Mlocal::lib)
|
||||
RUN su pbot && cpanm --local-lib=/home/pbot/perl5 local::lib && eval $(perl -I /home/pbot/perl5/lib/perl5/ -Mlocal::lib)
|
||||
|
||||
# Install pbot from sources and get dependencies.
|
||||
COPY . /opt/pbot
|
||||
|
|
|
@ -13,15 +13,15 @@ RUN sed -i -e "s/\/dev\/ttyS2/\/tmp\/ttyS2/g" /opt/pbot/applets/pbot-vm/guest/bi
|
|||
RUN sed -i -e "s/\/dev\/ttyS3/\/tmp\/ttyS3/g" /opt/pbot/applets/pbot-vm/guest/bin/guest-server
|
||||
|
||||
# Setup the guest server.
|
||||
RUN cd /opt/pbot/applets/pbot-vm/guest/bin && ln -al
|
||||
RUN cd /opt/pbot/applets/pbot-vm/guest/bin && ls -al
|
||||
RUN cd /opt/pbot/applets/pbot-vm && ./guest/bin/setup-guest
|
||||
|
||||
# Prefer a non-root user.
|
||||
RUN useradd -ms /bin/bash vm
|
||||
USER vm
|
||||
|
||||
# Just in case files are created in the working directory.
|
||||
WORKDIR /home/vm
|
||||
|
||||
# Single entry point for both the host and the guest.
|
||||
USER vm
|
||||
ENTRYPOINT ["/opt/pbot/applets/pbot-vm/entrypoint.sh"]
|
Loading…
Reference in New Issue