-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
30 lines (23 loc) · 818 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
FROM sylhare/jekyll:latest
WORKDIR /app
COPY . /app
# To run using the theme as the gem, creating default files automatically
# ---
# Configurations are in _config.yml
RUN echo "Make sure you have a _config.yml" && cat _config.yml
RUN echo "theme: reveal-jekyll" >> /app/_config.yml
# Create index.html
RUN echo "---" >> /app/index.html
RUN echo "layout: presentation" >> /app/index.html
RUN echo "---" >> /app/index.html
RUN echo "Creating a basic index.html" && cat /app/index.html
# Create Gemfile
RUN echo "Adding the Gemfile"
RUN echo "source \"https://rubygems.org\"" >> /app/Gemfile
RUN echo "gem 'reveal-jekyll', '~> 0.0.4'" >> /app/Gemfile
# ---
# Install dependencies
RUN bundle install
EXPOSE 4000
# docker run -p 4000:4000 <image_name>
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"]