+ Fixes for installing supervisor in workspace container
This commit is contained in:
@ -236,14 +236,27 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
|||||||
bash -ic 'python -m pip install uvicorn' \
|
bash -ic 'python -m pip install uvicorn' \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
RUN if [ false = true ]; then \
|
# Install Python packages for supervisor if needed
|
||||||
python -m pip install uvicorn && \
|
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
|
||||||
python -m pip install --upgrade supervisor && \
|
# 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 && \
|
echo_supervisord_conf > /etc/supervisord.conf && \
|
||||||
sed -i 's/\;\[include\]/\[include\]/g' /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 \
|
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
SHELL ["/bin/sh", "-c"]
|
SHELL ["/bin/sh", "-c"]
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -301,4 +314,4 @@ COPY ./crontab/* /etc/cron.d/
|
|||||||
|
|
||||||
RUN chmod -R 644 /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"]
|
||||||
|
Reference in New Issue
Block a user