From aa818b40f790bfdb09e194278151b26583ec13d4 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 16 Aug 2020 20:59:04 +0200 Subject: [PATCH] Clean up --- Dockerfile | 19 +++++++++---------- bin/{start.sh => entrypoint.sh} | 3 ++- 2 files changed, 11 insertions(+), 11 deletions(-) rename bin/{start.sh => entrypoint.sh} (94%) mode change 100644 => 100755 diff --git a/Dockerfile b/Dockerfile index 2d321fd..6697392 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,17 @@ -FROM debian:stretch -MAINTAINER none +FROM debian:buster RUN \ apt-get update \ - && apt-get install --yes python git python-pip libssl-dev libbz2-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && pip install zeroc-ice + && apt-get install --yes python3 git python3-pip libssl-dev libbz2-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && pip3 install --no-cache-dir zeroc-ice \ + && useradd -U -d /mumo -m mumo -ADD bin/start.sh /tmp/start.sh -RUN chmod 755 /tmp/start.sh VOLUME ["/data"] -RUN git clone https://github.com/mumble-voip/mumo.git +ADD bin/entrypoint.sh /entrypoint.sh + +RUN git clone https://github.com/mumble-voip/mumo.git --depth 1 WORKDIR /mumo -CMD ["/tmp/start.sh"] +CMD ["/entrypoint.sh"] diff --git a/bin/start.sh b/bin/entrypoint.sh old mode 100644 new mode 100755 similarity index 94% rename from bin/start.sh rename to bin/entrypoint.sh index 1f10c39..93b95ae --- a/bin/start.sh +++ b/bin/entrypoint.sh @@ -22,4 +22,5 @@ cp -r /data/mumo.ini /mumo cp -r /data/modules /mumo # TODO: Add from git cp -r /data/modules-available /mumo cp -r /data/modules-enabled /mumo -exec /mumo/mumo.py + +exec su mumo -c "python3 /mumo/mumo.py"