Skip to content

Instantly share code, notes, and snippets.

@djbender
Last active January 21, 2020 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djbender/6484b18152f41ada3772091f12cf5795 to your computer and use it in GitHub Desktop.
Save djbender/6484b18152f41ada3772091f12cf5795 to your computer and use it in GitHub Desktop.
a minimal repro for mounting individual files like the id_rsa file into a container
#!/usr/bin/env bash
docker run -it -v $HOME/.ssh/id_rsa:/Users/docker/.ssh/id_rsa alpine sh -c "ls -lah /Users/docker/.ssh/"
# which should output something like:
#
# total 12K
# drwxr-xr-x 2 root root 4.0K Jan 21 19:19 .
# drwxr-xr-x 3 root root 4.0K Jan 21 19:19 ..
# -r-------- 1 10000000 10000000 1.7K Sep 27 2017 /Users/docker/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment