# Use the base image | |
FROM hlohaus789/g4f:latest | |
# Set working directory | |
WORKDIR /app | |
# Create necessary directories | |
RUN mkdir -p /app/har_and_cookies /app/generated_images | |
# Set volume mount points | |
VOLUME ["/app/har_and_cookies", "/app/generated_images"] | |
# Expose the specified ports | |
EXPOSE 7860 8080 1337 7900 | |
# Increase shared memory size | |
# Note: The actual shm-size is set at runtime with --shm-size flag | |
RUN mkdir -p /dev/shm && chmod 777 /dev/shm | |
# Default command to run the container | |
CMD ["sh", "-c", "exec $CMD"] |