Skip to content

Instantly share code, notes, and snippets.

@porras
Created March 20, 2017 13:00
Show Gist options
  • Save porras/57043acf85a3d3b3690579808ad21097 to your computer and use it in GitHub Desktop.
Save porras/57043acf85a3d3b3690579808ad21097 to your computer and use it in GitHub Desktop.
Dockerfile and wrapper script for a nanoc project
FROM ruby:2.4
ADD Gemfile /opt/
ADD Gemfile.lock /opt/
WORKDIR /opt
RUN bundle install
CMD bundle exec nanoc -v
EXPOSE 3000
#!/bin/bash
# this file should be executable and assumes a normal nanoc Gemfile
# Usage:
# ./nanoc whatever
# does the same as nanoc whatever, examples:
# ./nanoc compile
# ./nanoc live
# ./nanoc help check
docker build -t mynanocproject .
docker run -v $PWD:/data -w /data -p 3000:3000 mynanocproject bundle exec nanoc "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment