From a0f93700e22150d271cd7421fa19270fd7c466c8 Mon Sep 17 00:00:00 2001 From: Lukas Pol Date: Mon, 20 Apr 2020 18:15:14 -0300 Subject: [PATCH] change order Dockerfile Signed-off-by: Lukas Pol --- ruby_on_rails-postgres/web/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ruby_on_rails-postgres/web/Dockerfile b/ruby_on_rails-postgres/web/Dockerfile index d14c4df..7c32753 100644 --- a/ruby_on_rails-postgres/web/Dockerfile +++ b/ruby_on_rails-postgres/web/Dockerfile @@ -3,6 +3,11 @@ FROM ruby:2.6.5 # install nodejs / libdev / postgres-client RUN apt-get update -qq && apt-get install -y nodejs libpq-dev postgresql-client +## install yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* + RUN mkdir /myapp WORKDIR /myapp COPY Gemfile /myapp/Gemfile @@ -13,14 +18,8 @@ RUN gem install bundler:2.0.2 RUN bundle install COPY . /myapp -## install yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* - - ## Add Endpoint COPY entrypoint.sh /usr/bin/ RUN chmod +x /usr/bin/entrypoint.sh ENTRYPOINT ["entrypoint.sh"] -EXPOSE 3000 \ No newline at end of file +EXPOSE 3000