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
I also had to deal with the same problem, instead of copying ssh keys in to Docker files and cleaning up I cloned the repo in to workspace as a cloud build step. Contents in workspace is persisted across builds steps and can be used indocker file during build.
# Clone git repo.
- name: 'gcr.io/cloud-builders/git'
id: git-clone
args:
- clone
- git@github.com:repo.git
- workspace/repo-clone
volumes:
- name: 'ssh'
path: /root/.ssh
Then in docker file.
COPY workspace/repo-name build/