Created
September 29, 2019 03:30
-
-
Save jorgedjr21/9a15cd9acedc53ba3d26ea5876d1e83c to your computer and use it in GitHub Desktop.
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.6.3 | |
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 -qq && apt-get install -y nodejs postgresql-client yarn | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
COPY . /myapp | |
# Add a script to be executed every time the container starts. | |
COPY entrypoint.sh /usr/bin/ | |
RUN chmod +x /usr/bin/entrypoint.sh | |
ENTRYPOINT ["entrypoint.sh"] | |
EXPOSE 3000 | |
# Start the main process. | |
CMD ["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