Created
March 20, 2017 13:00
-
-
Save porras/57043acf85a3d3b3690579808ad21097 to your computer and use it in GitHub Desktop.
Dockerfile and wrapper script for a nanoc project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.4 | |
ADD Gemfile /opt/ | |
ADD Gemfile.lock /opt/ | |
WORKDIR /opt | |
RUN bundle install | |
CMD bundle exec nanoc -v | |
EXPOSE 3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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