Created
August 11, 2015 07:34
-
-
Save dakatsuka/352dfa1b58d156fd3157 to your computer and use it in GitHub Desktop.
Dockerfile for Ruby on Rails
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
FROM ruby:2.2.2 | |
RUN apt-get update && apt-get install -y nodejs npm mysql-client --no-install-recommends && rm -rf /var/lib/apt/lists/* | |
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY Gemfile /usr/src/app/ | |
COPY Gemfile.lock /usr/src/app/ | |
COPY package.json /usr/src/app/ | |
RUN bundle install -j4 | |
RUN npm install | |
COPY . /usr/src/app | |
EXPOSE 3000 | |
CMD ["bundle", "exec", "unicorn", "-p", "3000", "-c", "config/unicorn/docker.rb"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment