Passing files from Google Cloud Container Builder to Docker build task

前端 未结 3 1724
灰色年华
灰色年华 2021-02-06 07:17

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

3条回答
  •  灰色年华
    2021-02-06 08:07

    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.

提交回复
热议问题