30
Dockerコンテナー内でのSSHキーの使用
git cloneやgit pushを実行するなど、Gitを使ってさまざまな楽しいことを実行するアプリがあります。 コンテナ「ユーザー」が使用するために、SSHキーをコンテナに追加できるようにする必要があるのですが、問題が発生しています。 私はそれを/root/.ssh/にコピーして変更$HOMEし、git sshラッパーを作成しようとしましたが、まだうまくいきませんでした。 参照用のDockerfileは次のとおりです。 #DOCKER-VERSION 0.3.4 from ubuntu:12.04 RUN apt-get update RUN apt-get install python-software-properties python g++ make git-core openssh-server -y RUN add-apt-repository ppa:chris-lea/node.js RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list RUN apt-get update RUN apt-get install nodejs -y ADD . /src ADD ../../home/ubuntu/.ssh/id_rsa /root/.ssh/id_rsa RUN …