diff --git a/bbb-libreoffice/assets/libreoffice_container.sh b/bbb-libreoffice/assets/libreoffice_container.sh index 02e1ef0ee9..dc1a4454c6 100755 --- a/bbb-libreoffice/assets/libreoffice_container.sh +++ b/bbb-libreoffice/assets/libreoffice_container.sh @@ -35,7 +35,7 @@ if (($INSTANCE_NUMBER >= 1)); then iptables -C $FORWARD_RULE || iptables -I $FORWARD_RULE - docker run --network bbb-libreoffice --name bbb-libreoffice-${INSTANCE_NUMBER} -p $PORT:8000 -v${SOFFICE_WORK_DIR}:${SOFFICE_WORK_DIR} --rm bbb-libreoffice & + docker run --network bbb-libreoffice --user `id -u bigbluebutton` --name bbb-libreoffice-${INSTANCE_NUMBER} -p $PORT:8000 -v${SOFFICE_WORK_DIR}:${SOFFICE_WORK_DIR} --rm bbb-libreoffice & wait $! else diff --git a/bbb-libreoffice/docker/Dockerfile b/bbb-libreoffice/docker/Dockerfile index 30f4f67e6c..3f8a9983e9 100644 --- a/bbb-libreoffice/docker/Dockerfile +++ b/bbb-libreoffice/docker/Dockerfile @@ -4,26 +4,12 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -ARG user_id -RUN echo "User id = $user_id" - -RUN addgroup --system --gid $user_id libreoffice - -# We need to ensure that this user id is the same as the user bigbluebutton in the host -RUN adduser --disabled-password --system --disabled-login --shell /sbin/nologin --gid $user_id --uid $user_id libreoffice - RUN apt -y install locales-all fontconfig libxt6 libxrender1 RUN apt -y install libreoffice --no-install-recommends RUN dpkg-reconfigure fontconfig && fc-cache -f -s -v VOLUME ["/usr/share/fonts/"] -RUN chown libreoffice /home/libreoffice/ +ADD ./bbb-libreoffice-entrypoint.sh /usr/local/bin/ -ADD ./bbb-libreoffice-entrypoint.sh /home/libreoffice/ -RUN chown -R libreoffice /home/libreoffice/ -RUN chmod 700 /home/libreoffice/bbb-libreoffice-entrypoint.sh - -USER libreoffice - -ENTRYPOINT ["/home/libreoffice/bbb-libreoffice-entrypoint.sh" ] +ENTRYPOINT ["/usr/local/bin/bbb-libreoffice-entrypoint.sh" ] diff --git a/bbb-libreoffice/docker/bbb-libreoffice-entrypoint.sh b/bbb-libreoffice/docker/bbb-libreoffice-entrypoint.sh old mode 100644 new mode 100755 diff --git a/bbb-libreoffice/install.sh b/bbb-libreoffice/install.sh index a1a2c07515..c4aa962537 100755 --- a/bbb-libreoffice/install.sh +++ b/bbb-libreoffice/install.sh @@ -25,7 +25,7 @@ fi IMAGE_CHECK=`docker image inspect bbb-libreoffice &> /dev/null && echo 1 || echo 0` if [ "$IMAGE_CHECK" = "0" ]; then echo "Docker image doesn't exists, building" - docker build -t bbb-libreoffice --build-arg user_id=`id -u bigbluebutton` docker/ + docker build -t bbb-libreoffice docker/ else echo "Docker image already exists"; fi