From fa5ef8e10ee94743ec82f80b4fa3964aea71d0a9 Mon Sep 17 00:00:00 2001 From: wforget <643348094@qq.com> Date: Wed, 28 Aug 2024 19:40:52 +0800 Subject: [PATCH] [GLUTEN-7055][VL] Make ssh keys of gluten-vcpkg-builder configurable --- dev/vcpkg/docker/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dev/vcpkg/docker/Dockerfile b/dev/vcpkg/docker/Dockerfile index 7332bbf45f80..d651221464f6 100644 --- a/dev/vcpkg/docker/Dockerfile +++ b/dev/vcpkg/docker/Dockerfile @@ -19,6 +19,21 @@ RUN if ["$BUILDER_UID" != "0"]; then \ fi USER ${BUILDER_UID}:${BUILDER_GID} +ARG SSH_PRV_KEY +ARG SSH_PUB_KEY +RUN mkdir -p ~/.ssh && \ + chmod 0700 ~/.ssh +RUN if [[ -n "$SSH_PRV_KEY" ]] ; then \ + echo "$SSH_PRV_KEY" > ~/.ssh/id_rsa && \ + chmod 600 ~/.ssh/id_rsa && \ + echo -e "Host *\n StrictHostKeyChecking no" > ~/.ssh/config && \ + chmod 600 ~/.ssh/config; \ + fi +RUN if [[ -n "$SSH_PUB_KEY" ]] ; then \ + echo "$SSH_PUB_KEY" > ~/.ssh/id_rsa.pub && \ + chmod 600 ~/.ssh/id_rsa.pub; \ + fi + ENV VCPKG_BINARY_SOURCES=default COPY docker/entrypoint.sh /entrypoint ENTRYPOINT ["/entrypoint"]