Folks, After following a few threads on how to add ssh keys to the docker container for the application build phase, I am getting an interesting error:
Load key "/root/.ssh/id_rsa": invalid format
My Dockerfile:
RUN mkdir /root/.ssh/
ADD serviceBitbucketKey.ssh /root/.ssh/id_rsa
RUN chmod 400 /root/.ssh/id_rsa
RUN touch /root/.ssh/`known_hosts
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN git ls-remote git@bitbucket.org:orgName/repo.git
RUN git config --global url.ssh://git@bitbucket.org/.insteadOf https://bitbucket.org/
I do know the key is fine... it was generated via
ssh-keygen -t rsa -b 4096 -f serviceBitbucketKey.ssh
Suggestions? Thanks!