Created
March 20, 2020 09:46
-
-
Save nhattan/32f6951d94e42d63a0660d43de94dd54 to your computer and use it in GitHub Desktop.
Rails 6 Dockerfile
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.7.0 | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ | |
apt-get update -qq && apt-get install -y \ | |
build-essential \ | |
nodejs \ | |
yarn | |
RUN mkdir /app | |
WORKDIR /app | |
COPY Gemfile Gemfile.lock ./ | |
RUN gem install bundler | |
RUN bundle install --jobs 4 --retry 3 | |
COPY package.json yarn.lock ./ | |
RUN yarn install --check-files | |
COPY . /app | |
EXPOSE 3000 | |
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment