Want to see how your blog will turn out before you publish? Just open a PR on your repo and Dockup will spin up a live blog for you!
Once we have the source, let's add a couple of files to the root of our project. We will build the Jekyll source and then serve those files with Nginx.
# ============================================================# Build you je kyll blog# ============================================================FROM jekyll/jekyll:stable AS buildRUN mkdir /jekyll-minimaWORKDIR /jekyll-minima# copy the blog sourceCOPY . .# permission for bundle to write gemfile.lockRUN chmod 777 ./# Install dependenciesRUN bundle install# BuildRUN bundle exec jekyll build# ============================================================# Serve the build files with NGINX# ============================================================FROM nginx as nginxCOPY nginx.conf /etc/nginx/conf.d/default.conf# Copy build files of the blogCOPY --from=build /jekyll-minima/_site /usr/share/nginx/htmlEXPOSE 80
Now that we have a Dockerfile added to the source, let's create a Dockup Blueprint.
And that's all! Wasn't that easy?
Now you can test out your articles against PRs, or you can even apply the same steps in configuring a new theme development altogether!
One another thing to note here is that, you can apply this very same steps to even test other static website generator tools, say for e.g. Hugo.