forked from FiQCI/fiqci.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (33 loc) · 993 Bytes
/
Dockerfile
File metadata and controls
44 lines (33 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Use Ruby 3.3.5 as base image
FROM ruby:3.3.5-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 22.10.0
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs
# Verify versions
RUN ruby --version && node --version && npm --version
# Set working directory
WORKDIR /app
# Copy dependency files first for better caching
COPY Gemfile Gemfile.lock ./
COPY package.json package-lock.json* ./
# Install bundler and Ruby gems
RUN gem install bundler
RUN bundle config set --local path 'vendor/bundle'
RUN bundle install
# Install Node.js packages
RUN npm install
# Copy the rest of the application
COPY . .
# Set up Jekyll source directory
ENV JEKYLL_ENV=development
ENV BUNDLE_PATH=vendor/bundle
# Expose port 4000 for Jekyll
EXPOSE 4000
# Default command - can be overridden in docker-compose
CMD ["npm", "run", "watch"]