Skip to content

Commit

Permalink
Docker updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalie committed Jul 4, 2023
1 parent 0d6db42 commit 29fc932
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN bundle config set --global no-cache 'true' && \
bundle config set --global jobs `expr $(cat /proc/cpuinfo | grep -c 'cpu cores')` && \
bundle config set --global retry 3


FROM base as builder

# packages required
Expand All @@ -38,7 +39,9 @@ COPY ./lib/travis/yml/version.rb ./lib/travis/yml/version.rb
COPY Gemfile Gemfile.lock ./

# Install gems
RUN bundle install
RUN bundle install && \
rm -rf /app/vendor/bundle/ruby/2.6.0/cache/* && \
for i in `find /app/vendor/ -name \*.o -o -name \*.c -o -name \*.h`; do rm -f $i; done


FROM base
Expand All @@ -47,6 +50,7 @@ LABEL maintainer Travis CI GmbH <support+travis-live-docker-images@travis-ci.com

# Copy gems from builder
COPY --from=builder /usr/local/bundle /usr/local/bundle
COPY --from=builder /app/vendor ./vendor

# Copy app files
COPY . ./
Expand Down

0 comments on commit 29fc932

Please sign in to comment.