Skip to content

Instantly share code, notes, and snippets.

@vtombesi
Created March 17, 2018 12:05
Show Gist options
  • Save vtombesi/449425d3e96a48bc04ff04c6885908f8 to your computer and use it in GitHub Desktop.
Save vtombesi/449425d3e96a48bc04ff04c6885908f8 to your computer and use it in GitHub Desktop.
A Docker keygen container for generating ssh keys in the current directory (keys/)
printf "FROM ubuntu:latest \nRUN apt-get update; apt-get -y install openssh-client \nCMD rm /keys/id_rsa*; ssh-keygen -q -t rsa -N '' -f /keys/id_rsa" > Dockerfile
docker build -t keygen-container .
docker run -v $(pwd)/keys:/keys keygen-container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment