Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use docker to install the dependencies
- Loading branch information
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scripts | ||
ipadic | ||
tweet.markov |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ruby:2.5.0-alpine | ||
|
||
ENV APP_ROOT='/src/github.com/takuti/twitter-bot' | ||
|
||
ADD . ${APP_ROOT} | ||
WORKDIR ${APP_ROOT} | ||
|
||
RUN apk update && \ | ||
apk add --no-cache --virtual .builddeps ca-certificates wget openjdk7-jre build-base libxml2-dev libxslt-dev && \ | ||
update-ca-certificates && \ | ||
wget 'http://osdn.jp/frs/redir.php?m=jaist&f=%2Figo%2F52344%2Figo-0.4.3.jar' -O igo.jar && \ | ||
wget 'https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM' -O mecab-ipadic.tar.gz && \ | ||
tar zxfv mecab-ipadic.tar.gz && \ | ||
java -cp igo.jar net.reduls.igo.bin.BuildDic ipadic mecab-ipadic-2.7.0-20070801 EUC-JP && \ | ||
rm -rf igo.jar mecab-ipadic-2.7.0-20070801 mecab-ipadic.tar.gz && \ | ||
bundle install && \ | ||
apk del .builddeps | ||
|
||
EXPOSE 80 | ||
CMD ["bundle", "exec", "rackup", "config.ru", "-p", "80", "-o", "0.0.0.0"] |