FROM maven:3.3.3 COPY ./keys/id_rsa.priv.txt /root/.ssh/id_rsa COPY ./deploy.sh /bin/deploy.sh RUN set -x \ && ssh-keyscan -t rsa accounting.toposoft.lv >> /root/.ssh/known_hosts \ && ssh-keyscan -t rsa gitlab.com >> /root/.ssh/known_hosts \ && chmod 600 /root/.ssh/id_rsa \ && chmod 755 /bin/deploy.sh \ && git config --global user.email "sergey@toposoft.lv" \ && git config --global user.name "Sergey" WORKDIR /usr/local/src VOLUME /usr/local/src/target CMD ["java", "-version"]