diff --git a/Dockerfile b/Dockerfile index 706727c9..d4785dc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/applets/pbot-vm/Dockerfile b/applets/pbot-vm/Dockerfile index ced6626d..d2d7be71 100644 --- a/applets/pbot-vm/Dockerfile +++ b/applets/pbot-vm/Dockerfile @@ -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"] \ No newline at end of file