Closed bartdorlandt closed 4 years ago
Hey @bartdorlandt. I am not sure as this matters? Basically speaking there is only the root user inside the container, so it will make that if it doesn't already exist? I could make a .ssh directory? Would that resolve the issue?
Hi @willhallonline , I was just referring to the documentation. I see now, that I wasn't very clear. apologies.
The documentation shows:
Mount local directory and ssh key
$ docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/id_rsa willhallonline/ansible:2.7 /bin/sh
Injecting commands
$ docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/id_rsa willhallonline/ansible:2.7 ansible-playbook playbook.yml
I believe they should be:
Mount local directory and ssh key
$ docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/.ssh/id_rsa willhallonline/ansible:2.7 /bin/sh
Injecting commands
$ docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/.ssh/id_rsa willhallonline/ansible:2.7 ansible-playbook playbook.yml
Note the ".ssh/" between root and id_rsa.
The bash_aliases show pretty much the same, but with the correct mount points.
if desired i could do a pull request.
If you want to do a PR that would be good 🥇 . If you don't want to then I'll do it, but I would love to say that someone else has contributed 👍 😀
You are totally right by the way with regards to the issue.
PR done. cheers.
in the mount and inject command example the .ssh portion is missing (on the right side of the ":").