forked from pioneers/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (24 loc) · 862 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
24
25
26
27
28
29
30
31
32
33
FROM ruby:2.6.3
MAINTAINER Scott Numamoto <[email protected]>
# Install bundler for dependency management
RUN apt-get update -qq && apt-get install -y build-essential
# Copy over the Gemfile. This reduces effort required to re-build
ADD Gemfile /srv/jekyll/Gemfile
ADD Gemfile.lock /srv/jekyll/Gemfile.lock
# Use Bundler 2
ENV BUNDLER_VERSION 2.0.2
RUN gem install bundler
# Use this folder as dir we will work from
WORKDIR /srv/jekyll
# Install dependencies
RUN bundle install
# Expose port 4000, the port Jekyll exposes by default
# Rarely changed, but if needed, placed after the expensive download and install
# of dependencies
EXPOSE 4000
# Add the enclosing dir to the image at /srv/jekyll
ADD . /srv/jekyll
# Build the website
RUN bundle exec jekyll build
# Serve the website when we run the image
CMD bundle exec jekyll serve