-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 909 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (31 loc) · 909 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
# Use a slimmer Ruby base for development
FROM ruby:3.2-slim
LABEL maintainer="email@joshuamckenna.dev"
ENV LANG=C.UTF-8 \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=3 \
JEKYLL_ENV=development
# Install build-time deps + node (for assets)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
# Copy Gemfiles & install gems (caching layer)
COPY Gemfile Gemfile.lock ./
RUN gem install bundler \
&& bundle install --jobs "$BUNDLE_JOBS" --retry "$BUNDLE_RETRY"
# Copy your site’s source
COPY . .
# Expose Jekyll (4000) + LiveReload (35729)
EXPOSE 4000 35729
# Serve with live reload, drafts, incremental builds
CMD ["bundle", "exec", "jekyll", "serve",
"--host", "0.0.0.0",
"--port", "4000",
"--livereload",
"--incremental",
"--drafts"]