forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (24 loc) · 787 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 alpine:latest
MAINTAINER Lukas Behal <[email protected]>
#inspired by https://blog.codeship.com/build-minimal-docker-container-ruby-apps/
ENV BUILD_PACKAGES bash curl-dev ruby-dev libffi-dev build-base
ENV RUBY_PACKAGES ruby ruby-io-console ruby-bundler
# Update and install all of the required packages.
# At the end, remove the apk cache
RUN apk update && \
apk upgrade && \
apk add $BUILD_PACKAGES && \
apk add $RUBY_PACKAGES && \
rm -rf /var/cache/apk/*
RUN mkdir /usr/app
WORKDIR /usr/app
COPY Gemfile /usr/app/
COPY Gemfile.lock /usr/app/
# Install all required GEMs
RUN bundle install
# copy app to the Docker container
COPY . /usr/app
# Make port 4000 available to the world outside this container
EXPOSE 4000
# Run
CMD bundle exec jekyll serve