FROM starefossen/ruby-node:2-6-alpine
ENV GITHUB_GEM_VERSION 202
ENV JSON_GEM_VERSION 1.8.6
RUN apk --update add --virtual build_deps \
build-base ruby-dev libc-dev linux-headers \
&& gem install --verbose --no-document \
json:${JSON_GEM_VERSION} \
github-pages:${GITHUB_GEM_VERSION} \
jekyll-github-metadata \
minitest \
&& apk del build_deps \
&& apk add git \
&& mkdir -p /usr/src/app \
&& rm -rf /usr/lib/ruby/gems/*/cache/*.gem
WORKDIR /usr/src/app
ADD entrypoint.sh /entrypoint.sh
RUN chmod 744 /entrypoint.sh
# override defaul entrypoint
ENTRYPOINT ["/entrypoint.sh"]
CMD []
#!/bin/ash
cd /usr/src/app
bundle update && bundle install
jekyll serve -H 0.0.0.0 -P 4000
docker build -t jekyll-server .
docker run --name dev-wiki -p 4000:4000 -v /tmp/my/jekyll-repo:/usr/src/app -d jekyll-server
docker logs dev-wiki -f
sample https://github.com/gustavoquinalha/jekyll-help-center-theme