until ./sshDockerOsx.sh true; do
echo "sleep 2 for waiting"
sleep 2
done
echo "Docker-OSX SSH ready"
After docker run -d .... start up macOs, execute ./waitForDockerOsx.sh && ./sshDockerOsx.sh can auto wait and login macOS.
Originally created by @shifujun on GitHub (Jan 19, 2021).
Just sharing😃
Install `sshpass` for auto enter password.
`sudo yum install sshpass`
Make a `sshDockerOsx.sh`:
```
sshpass -p docker-osx \
ssh \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \
-p 50922 \
docker-osx@localhost $@
```
Make a `waitForDockerOsx.sh`:
```
until ./sshDockerOsx.sh true; do
echo "sleep 2 for waiting"
sleep 2
done
echo "Docker-OSX SSH ready"
```
After `docker run -d ....` start up macOs, execute `./waitForDockerOsx.sh && ./sshDockerOsx.sh` can auto wait and login macOS.
Perfect! This will work good for version 3, will be using SSH keys however, but the loop is good, thank you 😁!
@sickcodes commented on GitHub (Jan 19, 2021):
Perfect! This will work good for version 3, will be using SSH keys however, but the loop is good, thank you 😁!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @shifujun on GitHub (Jan 19, 2021).
Just sharing😃
Install
sshpassfor auto enter password.sudo yum install sshpassMake a
sshDockerOsx.sh:Make a
waitForDockerOsx.sh:After
docker run -d ....start up macOs, execute./waitForDockerOsx.sh && ./sshDockerOsx.shcan auto wait and login macOS.@sickcodes commented on GitHub (Jan 19, 2021):
Perfect! This will work good for version 3, will be using SSH keys however, but the loop is good, thank you 😁!
@sickcodes commented on GitHub (Jan 24, 2021):
Added here: https://github.com/sickcodes/Docker-OSX/commit/a09c565e36d45f6663567b7c4f1402279e725519