-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 807 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 807 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
FROM docker.io/library/ruby:4.0.1-alpine
# Install system dependencies
RUN apk add --no-cache \
build-base \
git \
nodejs \
npm \
chromium \
make
# Set chromium path for puppeteer (needed for mermaid diagrams)
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Install latest bundler version
RUN gem install bundler
# Install mermaid-cli globally
RUN npm install -g @mermaid-js/mermaid-cli
WORKDIR /srv
# Copy dependency files first for better caching
COPY Gemfile Gemfile.lock package*.json ./
# Install dependencies
RUN bundle install && npm install
# Ensure bundle bin is in PATH
ENV PATH="/usr/local/bundle/bin:$PATH"
EXPOSE 4000
CMD ["sh", "-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0 --future --drafts --unpublished --incremental --force_polling"]