Skip to content

Instantly share code, notes, and snippets.

@Hiweus
Created January 24, 2025 01:30
Show Gist options
  • Save Hiweus/80230121cfd36cb571155f9bc4ebe885 to your computer and use it in GitHub Desktop.
Save Hiweus/80230121cfd36cb571155f9bc4ebe885 to your computer and use it in GitHub Desktop.
busybox react host
FROM busybox
WORKDIR /app
# Copy React build files
COPY dist/ /app
# Set up the httpd configuration
# Http request will result in 404
# But the response content will be the site, so will render anyway
RUN echo "E404:/app/index.html" > /app/httpd.conf
# Expose port 80
EXPOSE 80
# Start httpd with the custom configuration
CMD ["httpd", "-f", "-v", "-p", "80", "-h", "/app", "-c", "/app/httpd.conf"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment