diff --git a/Dockerfile b/Dockerfile index b20f422..7c86e53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,28 @@ FROM ruby:3.4.1-alpine AS builder # Install build dependencies -RUN apk add --no-cache build-base +RUN apk add --no-cache build-base nodejs npm + +# Enable corepack for pnpm +RUN corepack enable # Set working directory WORKDIR /app -# Copy Gemfile and install dependencies +# Copy package files and install Node dependencies +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +# Copy Gemfile and install Ruby dependencies COPY Gemfile Gemfile.lock ./ RUN bundle install # Copy source files COPY . . +# Build assets with pnpm +RUN pnpm build:all + # Build Jekyll site RUN bundle exec jekyll build