In this way i can run command directly in the vm
vm fig run
vm docker ps -a
vm will change the virtual machine directory accordling to my local ( mac ) directory
In that way you can expose the docker service outside from the Virtual machine.
# /lib/systemd/system/docker.service
ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2375 -H fd://
then
systemctl daemon-reload && sudo service docker restart
So assuming that your vm ip is : 172.16.210.130
export DOCKER_HOST=tcp://172.16.210.130:2375
You will be able to use you local docker
command.
#!/bin/bash | |
locale="\/Users\/davidino" | |
remote="\/home\/obaley/" | |
cdir=`echo $(pwd) | sed "s/${locale}/${remote}"` | |
ssh -t in "cd $cdir; $@" |
interesting idea! :)