Giter Club home page Giter Club logo

Comments (3)

ahmetb avatar ahmetb commented on May 29, 2024

I'm not familiar with the inner workings of gcloud compute ssh but I assume it will need ssh and ssh-keygen installed in the Docker image, I am not sure these packages there. ssh certainly not installed in the new alpine-based image we're about to publish. What error are you seeing? Do other commands work fine?

from cloud-sdk-docker.

chad-autry avatar chad-autry commented on May 29, 2024

No errors, just that it prompts me for a password unlike when I run the command directly on gcloud.
Same issue when I run from my own image https://github.com/chad-autry/wac-gce-ansible

The whole purpose there was to package an ansible install into docker, but in the end I've installed ansible to my gcloud directory (with a script imitating the ssh command, but internally using gcloud compute ssh for the auto-authentication).

from cloud-sdk-docker.

salrashid123 avatar salrashid123 commented on May 29, 2024

@chad-autry

Looks like the README currently doens't show how to map your credential volume into a container.

the procedure is described in this article (specifically under Run gcloud cli without installing SDK locally). I'll separately update the readme in this repo to describe this procedure ot map credentils over. Note, once you create a volume w/ your creds in it, please handle it w/ care!

anyway, if you've initalized gcloud already on a laptop and have creds locally, you can ssh in w/ a similar technique:

$ docker run -ti -v ~/.ssh:/root/.ssh -v ~/.config/gcloud:/root/.config/gcloud google/cloud-sdk gcloud compute ssh $USER@janus --project your_projectID --zone us-central1-a

then i'm logged in to the remote

srashid@janus:~$ 

LMK if this works for you (i'll close this out then but update the readme anyway)

from cloud-sdk-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.