Context
A Ruby on Rails application built with Container Builder destined for App Engine. We require bundler to be able to install dependencies from a p
Dockerfile COPY can use multiple
resources, but the paths of files and directories will be interpreted as relative to the source of the context of the build.
That is your current path where you execute the docker build .
command.
In your case, if /root/.ssh is mounted when the Dockerfile executes its step, a simple RUN cp /root/.ssh/... /destination/path
would be enough.
However, you cannot mount a volume at docker build
time (see moby issue 14080), so check this solution: a multi-stage build can help.