forked from niphy/niphy.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 650 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (25 loc) · 650 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
# Use official Ruby image as base
FROM ruby:3.2-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
nodejs \
npm \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy Gemfile and Gemfile.lock
COPY Gemfile Gemfile.lock ./
# Install Ruby dependencies
RUN bundle install
# Copy package.json and package-lock.json
COPY package*.json ./
# Install Node.js dependencies
RUN npm install
# Copy the rest of the application
COPY . .
# Expose port
EXPOSE 4000
# Default command
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--port", "4000"]