I'm trying to clone a repository when building an image from a Dockerfile. I'm using the sequenceiq/docker-spark Dockerfile and extending it as follows (before the ENTRYPOINT
line):
RUN yum install -y git
RUN git clone git@github.com:myorg/myrepo.git
I get the following error after a few minutes:
Initialized empty Git repository in /myrepo/.git/
fatal: The remote end hung up unexpectedly
INFO[0128] The command [/bin/sh -c git clone git@github.com:myorg/myrepo.git] returned a non-zero code: 128
I've added the image's id_rsa.pub
to the Deploy Keys for that repository. I tried running bash
on the image and git clone
-ing with the same issue. I'm stumped. I found this related issue here but my ssh key is password-less, so it didn't help.