Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-cwd SSH #133

Open
Notgnoshi opened this issue Jul 16, 2024 · 0 comments
Open

docker-cwd SSH #133

Notgnoshi opened this issue Jul 16, 2024 · 0 comments
Labels

Comments

@Notgnoshi
Copy link
Owner

I found a slightly better way

    # SSH wants a user with the `id -u` UID to exist in the container. Mounting this /etc/passwd
    # file is how we achieve this.
    #
    # Additionally, we set GIT_SSH_COMMAND to disable strict host key checking, so our build doesn't
    # interactively prompt us to accept source.raven.engineering's ssh fingerprint.
    local PASSWD=/tmp/user-passwd
    echo "user::$(id -u):$(id -g)::$HOME:" >"$PASSWD"

...

        --volume "$SSH_AUTH_SOCK:$SSH_AUTH_SOCK" \
        --volume "$PASSWD:/etc/passwd" \
        --env SSH_AUTH_SOCK="$SSH_AUTH_SOCK" \
        --env GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" \
        --user "$(id -u)":"$(id -g)" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant