-
Notifications
You must be signed in to change notification settings - Fork 42.6k
/
Dockerfile
24 lines (17 loc) · 640 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Base image: Ruby with necessary dependencies for Jekyll
FROM ruby:3.2
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /usr/src/app
# Copy Gemfile and Gemfile.lock into the container (necessary for `bundle install`)
COPY Gemfile Gemfile.lock ./
# Install bundler and dependencies
RUN gem install bundler:2.3.26 && bundle install
# Expose port 4000 for Jekyll server
EXPOSE 4000
# Command to serve the Jekyll site
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--watch"]