Skip to content

Commit

Permalink
Improve Dockerfile caching of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager committed Jan 23, 2024
1 parent 2c9e3f8 commit 1143ad1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ ENV MAKE "make --environment-overrides V=1"
# 2. The Ruby interpreter leaks data, so ignore these for now
ENV ASAN_OPTIONS "allocator_may_return_null=1,detect_leaks=0"

COPY . ruzzy/
# Split dependency and application code installation for improved caching
COPY ruzzy.gemspec Gemfile ruzzy/
WORKDIR ruzzy/
RUN bundler3.1 install

COPY . .
RUN rake compile

ENV LD_PRELOAD "$CLANG_DIR/lib/clang/17/lib/$CLANG_ARCH-unknown-linux-gnu/libclang_rt.asan.so"

ENTRYPOINT ["ruby", "bin/dummy.rb"]
ENTRYPOINT ["ruby", "-Ilib", "bin/dummy.rb"]
CMD ["-help=1"]

0 comments on commit 1143ad1

Please sign in to comment.