From 88a0dce9ccc289596a01461825e0c0c0199f4065 Mon Sep 17 00:00:00 2001 From: hrbrmstr Date: Sun, 26 Oct 2025 04:10:31 -0400 Subject: add: Dockerfile for Bonus Drop 101 --- 2025/2025-10-26-bonus-drop/Dockerfile | 39 +++++++++++++++++++++++++++++++++++ 2025/2025-10-26-bonus-drop/README.md | 12 +++++++++++ 2 files changed, 51 insertions(+) create mode 100644 2025/2025-10-26-bonus-drop/Dockerfile create mode 100644 2025/2025-10-26-bonus-drop/README.md (limited to '2025') 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`. -- cgit v1.2.3