I'm following a tutorial on docker stack, swarm, compose, etc.
the teacher connects to a VM of the swarm and then deploys a docker stack from this directory docker@node1:~/srv/swarm-stack-1
:
docker stack deploy -c example-voting-app-stack.yml voteapp
However, I can't get there because I don't know how to copy the yaml compose file from the course repository to the directory inside the VM.
How can I find out where is docker@node1
located in my PC ?
Here is what I tryed:
docker-machine start node1
Docker-machine ssh node1
So I get
Tommaso@N552VW-Tommaso MINGW64 /c/Applicazioni_Tommaso/Docker Toolbox
$ Docker-machine ssh node1
( '>')
/) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\) www.tinycorelinux.net
then
docker@node1:~/srv/swarm-stack-1$ pwd
/home/docker
ok then, but where is /home/docker
located in my PC ?
So I tryed to get around the obstacle by creating a yml file inside the VM and then editing it, rather than copying it from another directory.
# create the directory
docker@node1:~$ mkdir srv
docker@node1:~$ cd srv
docker@node1:~/srv$ mkdir swarm-stack-1
docker@node1:~/srv$ cd swarm-stack-1
docker@node1:~/srv/swarm-stack-1$
# create the yml file
touch example-voting-app-stack.yml
and here I stop because I don't know how to edit the file.
I can nor install vim or install a program to install vim.
This is what I tryed:
docker@node1:~/srv/swarm-stack-1$ vim example-voting-app-stack.yml
-bash: vim: command not found
docker@node1:~/srv/swarm-stack-1$ apt-get vim
-bash: apt-get: command not found
docker@node1:~/srv/swarm-stack-1$ yum install vim
-bash: yum: command not found
docker@node1:~/srv/swarm-stack-1$ apk install vim
-bash: apk: command not found
docker@node1:~/srv/swarm-stack-1$ sudo apt-get install vim
sudo: apt-get: command not found
docker@node1:~/srv/swarm-stack-1$ nano
-bash: nano: command not found
So, can somebody help me to understand how to copy files inside my VM (so finding out what is its path in my PC) or how to install a program to install vim and then install vim inside my VM ?