This seems to be a frequently asked question. I would like to ask again if anyone has an answer or see if anyone can suggest anything else.
We have many computers and running services, and they usually have a headache to update them. Docker enters. We would like to automate this process. Docker will work well for this, but I would like to automate the build so that any of our team can do this.
Part of the process involves cloning some git repositories.
One thing I could do is use the shell script to clone the repositories locally and then copy them to the image, but since there is a docker file that is supposed to automate the material, it seems natural to point the way there.
This is not a problem other than providing git credentials.
I am currently copying my id_rsa during the build process. Although you need to copy it, pull it out of the repo, and then delete my credentials. This should work fine except Dockerfile does not accept user input.
When I go to add my ssh key to the docker file, it wants my key password ... docker just searched because it cannot accept user input.
How can I get around this and still automate the process?
Here is an example from a docker file.
FROM ubuntu:14.04
MAINTAINER Senica Gonzalez <senica@gmail.com>
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install git-core
RUN apt-get -y install vagrant
RUN mkdir /home/.ssh
COPY id_rsa /home/.ssh/id_rsa
RUN eval "$(ssh-agent -s)"; ssh-add /home/.ssh/id_rsa; ssh-add -l