我的密钥受到密码保护,这是导致问题的原因,下面列出了一个工作文件(以帮助将来的Google员工)
FROM ubuntuMAINTAINER Luke Crooks "luke@pumalo.org"# Update aptitude with new repoRUN apt-get update# Install software RUN apt-get install -y git# Make ssh dirRUN mkdir /root/.ssh/# Copy over private key, and set permissions# Warning! Anyone who gets their hands on this image will be able# to retrieve this private key file from the corresponding image layerADD id_rsa /root/.ssh/id_rsa# Create known_hostsRUN touch /root/.ssh/known_hosts# Add bitbuckets keyRUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts# Clone the conf files into the docker containerRUN git clone git@bitbucket.org:User/repo.git



