forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (33 loc) · 828 Bytes
/
Dockerfile
File metadata and controls
41 lines (33 loc) · 828 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
FROM ruby:3.1-alpine
# Docker image for Jekyll blog with GitHub Pages support
LABEL maintainer="jesuswasrasta"
# Install system dependencies
RUN apk add --no-cache \
build-base \
curl \
wget \
bash \
cmake \
git \
nodejs \
npm \
libxml2-dev \
libxslt-dev \
readline-dev \
zlib-dev \
libffi-dev \
&& rm -rf /var/cache/apk/*
# Set working directory
WORKDIR /srv/jekyll
# Copy Gemfile and package.json for dependency installation
COPY Gemfile* ./
COPY package*.json ./
# Install Ruby gems
RUN bundle config set --local path 'vendor/bundle' && \
bundle install
# Install Node.js dependencies
RUN npm install
# Expose port 4000
EXPOSE 4000
# Default command to serve Jekyll
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--incremental", "--drafts"]