diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b20f422 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Build stage +FROM ruby:3.4.1-alpine AS builder + +# Install build dependencies +RUN apk add --no-cache build-base + +# Set working directory +WORKDIR /app + +# Copy Gemfile and install dependencies +COPY Gemfile Gemfile.lock ./ +RUN bundle install + +# Copy source files +COPY . . + +# Build Jekyll site +RUN bundle exec jekyll build + +# Production stage +FROM nginx:alpine + +# Copy built site from builder +COPY --from=builder /app/_site /usr/share/nginx/html + +# Expose port 80 +EXPOSE 80 + +# Start nginx +CMD ["nginx", "-g", "daemon off;"]