From b93f005334de64791ce71b530feee748041cb54a Mon Sep 17 00:00:00 2001 From: charles Date: Mon, 18 May 2026 23:17:45 -0700 Subject: [PATCH] Create dockerfile --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d48e5c4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM node:22-alpine AS builder + +# Set working directory +WORKDIR /app + +# Copy the book source files +COPY book /app/book + +# Set the working directory to the book folder +WORKDIR /app/book + +# Install honkit globally and build the book +RUN npm install -g honkit && \ + honkit build + +# Final Stage: Serve with Nginx +FROM nginx:alpine + +# Copy the rendered HTML from the builder stage +COPY --from=builder /app/book/_book /usr/share/nginx/html + +# Expose port 80 +EXPOSE 80 + +# Use the default Nginx configuration to serve static files +CMD ["nginx", "-g", "daemon off;"]