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"]