diff options
| author | hrbrmstr <bob@rud.is> | 2025-10-26 04:10:31 -0400 |
|---|---|---|
| committer | hrbrmstr <bob@rud.is> | 2025-10-26 04:10:31 -0400 |
| commit | 88a0dce9ccc289596a01461825e0c0c0199f4065 (patch) | |
| tree | ce5efa22e6287cb3f7300777a20131a281697a72 /2025 | |
| parent | 6701c78a2182699cb4d8adeae90251b429e24cd4 (diff) | |
add: Dockerfile for Bonus Drop 101
Diffstat (limited to '2025')
| -rw-r--r-- | 2025/2025-10-26-bonus-drop/Dockerfile | 39 | ||||
| -rw-r--r-- | 2025/2025-10-26-bonus-drop/README.md | 12 |
2 files changed, 51 insertions, 0 deletions
diff --git a/2025/2025-10-26-bonus-drop/Dockerfile b/2025/2025-10-26-bonus-drop/Dockerfile new file mode 100644 index 0000000..4061665 --- /dev/null +++ b/2025/2025-10-26-bonus-drop/Dockerfile @@ -0,0 +1,39 @@ +# Multi-stage Dockerfile for Restring web toolkit + +# Build stage +FROM node:22-alpine AS builder + +# Set working directory +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install dependencies +RUN npm ci + +# Copy source code +COPY . . + +# Build the application +RUN npm run build + +# Production stage +FROM nginx:alpine + +# Copy built files from builder stage +COPY --from=builder /app/build /usr/share/nginx/html + +# Copy custom nginx configuration if needed +# COPY nginx.conf /etc/nginx/nginx.conf + +# Expose port 80 +EXPOSE 80 + +# Add labels for better container management +LABEL name="restring" +LABEL description="A fast, modern toolbox for everyday development tasks" +LABEL version="0.0.1" + +# Start nginx +CMD ["nginx", "-g", "daemon off;"] diff --git a/2025/2025-10-26-bonus-drop/README.md b/2025/2025-10-26-bonus-drop/README.md new file mode 100644 index 0000000..19a0707 --- /dev/null +++ b/2025/2025-10-26-bonus-drop/README.md @@ -0,0 +1,12 @@ +# Restring Dockerfile + +This directory contains a `Dockerfile` for the [Restring](https://github.com/likang/restring) web app. + +Clone the repo, put this file in there and do: + +```bash +$ docker build -t restring . +$ docker run -d -p 3001:80 --name restring-web restring +``` + +Use any free port instead of `3001`. |
