Add docker build

This commit is contained in:
2026-05-19 22:32:56 -07:00
parent 353e844bf6
commit 6ba67b9f8e
2 changed files with 34 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
FROM node:22-alpine AS builder
# Set working directory
WORKDIR /app
# Copy the book source files
COPY . /app/flug
# Set the working directory to the book folder
WORKDIR /app/flug
# Install honkit globally and build the book
RUN npm install -g vite && \
npm install && \
vite build
# Final Stage: Serve with Nginx
FROM nginx:alpine
# Copy the rendered HTML from the builder stage
COPY --from=builder /app/flug/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Use the default Nginx configuration to serve static files
CMD ["nginx", "-g", "daemon off;"]
+7
View File
@@ -14,3 +14,10 @@ Run the development server:
```bash
vite serve
```
## Building docker image
To build the Docker image, run:
```bash
docker buildx build --platform linux/arm64 --push -t docker.tipsy.codes/flug:20260519 .
```