diff --git a/build-machine/bin/docker-entrypoint.sh b/build-machine/bin/docker-entrypoint.sh index f749ed04530b669bf10c8a99aee98cd478c377d1..6442bdaa805c307ee30e4ae59521a54ef9566a71 100755 --- a/build-machine/bin/docker-entrypoint.sh +++ b/build-machine/bin/docker-entrypoint.sh @@ -4,6 +4,9 @@ # The last arguments is to change owner of the final tarball in the # mounted volume. +mkdir -p ~/.ssh +ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + git clone --depth 1 -b ${1} ${2} server cd server make tar diff --git a/build-machine/build.sh b/build-machine/build.sh index aaccf18c2b770e63a89ecc3e64e80524bbf60dd0..5d5a4629ec71d1b7052a3389e782c3b9327fc486 100755 --- a/build-machine/build.sh +++ b/build-machine/build.sh @@ -68,6 +68,7 @@ test -d tarballs || mkdir tarballs docker run --rm \ --mount source="$(pwd)/tarballs",target=/build-root/tarballs,type=bind \ --mount source="$(pwd)/bin",target=/build-root/bin,type=bind \ - --mount source="${SSH_DIR}",target=/root/.ssh,readonly,type=bind \ + --mount type=bind,src=/run/host-services/ssh-auth.sock,target=/run/host-services/ssh-auth.sock \ + -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" \ -it \ ${DOCKER_IMAGE} ${GIT_BRANCH} ${GIT_REMOTE} $(id -u) $(id -g)