FROM ghcr.io/huggingface/chat-ui-db:0.9.4 # Switch to root to perform necessary setup steps like copying the startup script USER root # REMOVE THESE LINES from Dockerfile. They will be in custom_startup.sh now: # RUN mkdir -p /data/db # RUN chown -R 1000:1000 /data/db # Copy and make executable your custom startup script (MUST be done as root) COPY custom_startup.sh /usr/local/bin/custom_startup.sh RUN chmod +x /usr/local/bin/custom_startup.sh # Switch back to the 'user' for application execution USER user # Set the working directory (assuming /app is where ChatUI expects files) WORKDIR /app # (Keep or remove these COPY lines based on whether you're bringing your own files) # COPY package.json ./package.json # COPY .env.local ./ # COPY build/ ./build/ # COPY .env ./ CMD ["/usr/local/bin/custom_startup.sh"]