How can I copy installed gems from between Docker stages?

Viewed 289

I have a Dockerfile which I'm trying to make multi-staged. It looks something like this:

FROM <image> AS build-step
RUN bundle install

FROM <image>
COPY --from=build-step $BUNDLE_INSTALL_PATH ./

Now I'm not sure what to use for the BUNDLE_INSTALL_PATH. What's the cleanest way to copy over bundle installs from one stage to another?

0 Answers
Related