26 lines
657 B
Docker
26 lines
657 B
Docker
|
# Dockerfile to build and serve a jekyll site with the development webserver
|
||
|
FROM ubuntu:focal
|
||
|
LABEL Description="This image is used to learn building dockerfiles" \
|
||
|
Author="david@socialnerds.org" \
|
||
|
Version="0.1" \
|
||
|
License="MIT"
|
||
|
|
||
|
# environment variables
|
||
|
ENV JEKYLL_SITE=default
|
||
|
|
||
|
# copy stuff into the image
|
||
|
COPY jekyll.sh jekyll.sh
|
||
|
RUN chmod +x jekyll.sh
|
||
|
|
||
|
# expose port for `jekyll serve`
|
||
|
EXPOSE 4000
|
||
|
|
||
|
# volume definitions
|
||
|
VOLUME ["/mnt"]
|
||
|
|
||
|
# prepare the baseimage
|
||
|
RUN apt-get update && apt-get install -y ruby ruby-dev gcc g++ make libssl-dev libreadline-dev && \
|
||
|
gem update && gem install jekyll bundler
|
||
|
|
||
|
# run command
|
||
|
CMD ./jekyll.sh
|