Using heredoc in docker files.

This commit is contained in:
eleiton
2025-06-09 20:41:04 +02:00
parent 157784eb9a
commit ffafe50ca4
3 changed files with 11 additions and 3 deletions

View File

@@ -6,7 +6,12 @@ RUN apt-get update && \
ENV LD_PRELOAD=libjemalloc.so.2
# Download the ComfyUI repository
RUN echo '#!/bin/bash\ngit status || git clone https://github.com/comfyanonymous/ComfyUI.git /app \npip install -r /app/requirements.txt \npython /app/main.py "$@"' | tee /bin/startup.sh
RUN cat <<EOF > /bin/startup.sh
#!/bin/bash
git status || git clone https://github.com/comfyanonymous/ComfyUI.git /app
pip install -r /app/requirements.txt
python /app/main.py "\$@"
EOF
# Make the startup script executable
RUN chmod 755 /bin/startup.sh