Skip to content

Commit

Permalink
SSH setupping fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Nov 29, 2018
1 parent e4779b3 commit 6fea057
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@ RUN apt-get update && \
if test `ls ${HOME}/cvat/apps/git/keys -1 | wc -l` -gt 0; then \
mv ${HOME}/cvat/apps/git/keys/* ${HOME}/.ssh/ ; \
fi && \
cd ${HOME}/.ssh/ && \
eval `ssh-agent -s` && \
for possiblekey in `ls .`; do \
if grep -q PRIVATE "$possiblekey"; then \
ssh-add "$possiblekey"; \
fi \
done && \
echo '\neval `ssh-agent -s` && \' >> ${HOME}/.ssh_initialization && \
echo 'for possiblekey in `ls -d ${HOME}/.ssh/*`; do \' >> ${HOME}/.ssh_initialization && \
echo ' if grep -q PRIVATE "$possiblekey"; then \' >> ${HOME}/.ssh_initialization && \
echo ' ssh-add "$possiblekey"; \' >> ${HOME}/.ssh_initialization && \
echo ' fi \' >> ${HOME}/.ssh_initialization && \
echo 'done\n' >> ${HOME}/.ssh_initialization && \
. ${HOME}/.ssh_initialization && \
cat ${HOME}/.ssh_initialization >> ${HOME}/.bashrc && \
rm ${HOME}/.ssh_initialization && \
if test `ssh-add -l | grep "DSA\|RSA\|ECDSA\|ED25519\|RSA1" | wc -l` -eq 0; then \
ssh-keygen -b 4096 -t rsa -f `pwd`/id_rsa -q -N ""; \
ssh-keygen -b 4096 -t rsa -f ${HOME}/.ssh/id_rsa -q -N ""; \
fi
COPY tests ${HOME}/tests
Expand Down

0 comments on commit 6fea057

Please sign in to comment.