Skip to content

Instantly share code, notes, and snippets.

@aaronice
Last active November 8, 2018 00:37
Show Gist options
  • Save aaronice/6f14c2be7088fbddfab5b9550a0a24dc to your computer and use it in GitHub Desktop.
Save aaronice/6f14c2be7088fbddfab5b9550a0a24dc to your computer and use it in GitHub Desktop.
Docker SSH Setup

For mounted volume in VM or attached volume in Docker container, you may copy your SSH public and private key to the "shared" directory, and then copy then to the virtual environment SSH folder (~/.ssh/), such as:

$ cp id_rsa ~/.ssh/id_rsa
$ cp id_rsa.pub ~/.ssh/id_rsa.pub
$ eval `ssh-agent`
$ ssh-add

Or else, generate a new SSH key pairs and add the public key to GitHub (may refer to the "Generating a new SSH Key" help documentation on GitHub)

Since rebar3 use Git to manage dependencies, this will be important step for the Erlang projects using rebar3, such as ox-http-gateway.

https://docs.docker.com/docker-cloud/cloud-swarm/ssh-key-setup/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment