diff --git a/Dockerfile b/Dockerfile index 0cc579f..96d766f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,22 @@ -FROM ruby:2.6.6-alpine3.13 +FROM ruby:2.6.6-alpine3.13 AS build RUN apk update && apk upgrade && \ - apk add --no-cache bash git openssh build-base gcc wget git + apk add --no-cache git openssh build-base gcc wget git RUN gem install bundler -v 2.3.6 -WORKDIR /opt/representer - COPY Gemfile Gemfile.lock . RUN bundle install +FROM ruby:2.6.6-alpine3.13 AS runtime + +RUN apk add --no-cache bash + +WORKDIR /opt/representer + +COPY --from=build /usr/local/bundle /usr/local/bundle + COPY . . ENTRYPOINT ["sh", "/opt/representer/bin/run.sh"]