From 013520ddfb267d05fd32ebd5d4bb1f0df3d817f2 Mon Sep 17 00:00:00 2001 From: Aleksandr Ivanov Date: Mon, 22 Sep 2025 14:53:36 +0300 Subject: [PATCH] + Fixes for installing supervisor in workspace container --- dockerfiles/workspace/workspace.base.Dockerfile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/dockerfiles/workspace/workspace.base.Dockerfile b/dockerfiles/workspace/workspace.base.Dockerfile index 51a1bf1..cc2e2ce 100644 --- a/dockerfiles/workspace/workspace.base.Dockerfile +++ b/dockerfiles/workspace/workspace.base.Dockerfile @@ -236,14 +236,27 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \ bash -ic 'python -m pip install uvicorn' \ ;fi -RUN if [ false = true ]; then \ - python -m pip install uvicorn && \ - python -m pip install --upgrade supervisor && \ +# Install Python packages for supervisor if needed +RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \ + # Ensure python3 and pip are available \ + # apt-get update -qq && \ + # apt-get install python3 python3-pip -qq && \ + # python3 -m pip install uvicorn && \ + # python3 -m pip install --upgrade supervisor \ + bash -ic 'python -m pip install --upgrade supervisor' \ +;fi + +USER root + +# Configure supervisor +RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \ echo_supervisord_conf > /etc/supervisord.conf && \ sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \ sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \ ;fi +USER laradock + SHELL ["/bin/sh", "-c"] ########################################################################### @@ -301,4 +314,4 @@ COPY ./crontab/* /etc/cron.d/ RUN chmod -R 644 /etc/cron.d -#ENTRYPOINT ["/bin/bash","-c","service supervisor start"] +ENTRYPOINT ["/bin/bash","-c","if [ ${INSTALL_PYTHON} = true ] && [ ${INSTALL_SUPERVISOR} = true ]; then service supervisor start; fi"]