Last active
November 26, 2020 11:45
-
-
Save cupnoodle/042426d52f7d2b9f767adefcb47fbbca to your computer and use it in GitHub Desktop.
Basic 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 | |
# Add the key of yarn repo | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update -yqq | |
RUN apt-get install -yqq --no-install-recommends nodejs yarn | |
COPY . /usr/src/app | |
WORKDIR /usr/src/app | |
RUN bundle install && rails webpacker:install | |
CMD ["bin/rails", "s", "-b", "0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment