# Use the official Firefox image | |
FROM jlesage/firefox:latest | |
# Set environment variables for Hugging Face compliance | |
ENV APP_PORT=7860 | |
ENV HF_HOME="/data/huggingface" | |
# Create the necessary directories and adjust permissions | |
RUN mkdir -p /data/huggingface /config/log/firefox && \ | |
chown -R 1000:1000 /data/huggingface /config/log/firefox | |
# Run the container as non-root for security | |
USER 1000 | |
# Expose the default port for Hugging Face | |
EXPOSE 7860 | |
# Start Firefox browser in headless mode, accessible via VNC or web UI | |
CMD ["/startapp.sh"] |