Simple container that ships Ubuntu with Jekyll installed.
- 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" ]
- Build and run the container
#!/bin/sh
docker build -t jekyll-container .
docker run --rm -it -p 8080:8080 -v ${PWD}:/home jekyll-container