Created
June 6, 2019 04:09
-
-
Save grohiro/01fff052b63d3178dd3a8a1d563066ac to your computer and use it in GitHub Desktop.
Dockerfile template
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.6.3-slim | |
| ENV APP_DIR /webapp | |
| ENV RUBYOPT -EUTF-8 | |
| RUN set -e \ | |
| && apt-get update -y -qq \ | |
| && apt-get install -y -qq \ | |
| awscli \ | |
| build-essential \ | |
| imagemagick \ | |
| jq \ | |
| libmecab-dev \ | |
| mecab \ | |
| mecab-ipadic-utf8 \ | |
| mecab-utils \ | |
| && apt-get autoremove -y \ | |
| && apt-get autoclean -y \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
| RUN mkdir -p $APP_DIR | |
| WORKDIR $APP_DIR | |
| COPY Gemfile $APP_DIR | |
| COPY Gemfile.lock $APP_DIR | |
| RUN bundle install | |
| COPY . $APP_DIR | |
| COPY dic/ /usr/share/mecab/dic/ipadic/ | |
| RUN /usr/lib/mecab/mecab-dict-index -U \ | |
| -o /usr/share/mecab/dic/ipadic \ | |
| -d /usr/share/mecab/dic/ipadic | |
| VOLUME ["/webapp"] | |
| ENTRYPOINT /webapp/entrypoint.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment