/container.jekyll

Jekyll Docker container based on Ubuntu.

Primary LanguageDockerfile

Jekyll container based on Ubuntu

Simple container that ships Ubuntu with Jekyll installed.

To use this container

  1. Create a Dockerfile based on this image in the same directory as the _config.yml file of your Jekyll website. The site will copied to the /home directory in the container.
FROM enclavenetworks/jekyll:latest

# copy site into container
COPY ./ .

# run bundle install and then clear the directory
RUN bundle install && \
    rm -rf $WEB_DIR

ENTRYPOINT ["/usr/local/bin/bundle"]

CMD [ "exec", "jekyll serve --host 0.0.0.0 --port 8080" ]
  1. Build and run the container
#!/bin/sh

docker build -t jekyll-container .
docker run --rm -it -p 8080:8080 -v ${PWD}:/home jekyll-container