· 7 years ago · May 31, 2018, 05:12 PM
1FROM ubuntu:14.04
2ARG SECRET_KEY="***"
3ARG PUB_KEY="***"
4RUN apt-get update
5RUN apt-get install -y software-properties-common git ssh-client
6RUN add-apt-repository ppa:deadsnakes/ppa
7RUN apt-get update
8RUN apt-get install -y python3-setuptools
9RUN easy_install3 pip
10
11RUN mkdir -p /app
12COPY . /app
13WORKDIR /app
14
15RUN mkdir /root/.ssh
16RUN echo "${SECRET_KEY}" > /root/.ssh/id_rsa
17RUN echo "${PUB_KEY}" > /root/.ssh/authorized_keys
18RUN ssh-keyscan git.ng.bluemix.net >> /root/.ssh/known_hosts
19
20RUN chmod 600 /root/.ssh/id_rsa
21RUN chmod 600 /root/.ssh/authorized_keys
22RUN chmod 644 /root/.ssh/known_hosts
23RUN chmod 755 /root/.ssh
24
25RUN echo "IdentityFile ~/.ssh/id_rsa" >> /etc/ssh/ssh_config
26
27RUN bash ./build.sh
28RUN pip install -r requirements.txt
29CMD ["python3", "-u", "updater.py"]
30
31Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).