How can I copy installed gems from between Docker stages?


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?

Source: Docker Questions

Categorised as bundler, docker, dockerfile, ruby, rubygems Tagged , , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us