comfyui-launcher / Dockerfile
multimodalart's picture
Update Dockerfile
2ab5ade verified
raw
history blame
992 Bytes
# Use the base image with your launcher
FROM docker.io/nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04@sha256:38e59267704b5d91ef63c7d8f613359c629fab0aead1283d59ca7821029e73bc
FROM thecooltechguy/comfyui_launcher AS launcher
# Create a non-root user first
RUN useradd -m -u 1000 user
# Fix all permission issues for unknown images
RUN chown -R user:user / || true
# Install Nginx as root
USER root
RUN apt-get update && \
apt-get install -y nginx && \
rm -rf /var/lib/apt/lists/*
# Configure Nginx to act as a reverse proxy
RUN rm /etc/nginx/sites-enabled/default
COPY nginx.conf /etc/nginx/sites-enabled/
COPY start.sh /start.sh
# Ensure proper permissions for Nginx directories
RUN chown -R user:user /var/lib/nginx /var/log/nginx /var/www/html /start.sh
RUN chmod +x /start.sh
# Setup symlink to use /data instead of /app
RUN mkdir /data && chown user:user /data
RUN ln -s /data /app
# Switch back to the non-root user for running applications
USER user
ENTRYPOINT ["/start.sh"]