You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: intermediate/docker-machine/README.md
+42-38
Original file line number
Diff line number
Diff line change
@@ -8,76 +8,80 @@ Docker machine is a tool which lets you to install docker engine in remote hosts
8
8
9
9
You can install docker-machine in various flavours of linux operating system and since I am using fedora so this file contain installation steps required to install in it.
For installation of docker-machine in other operating systems, kindly follow the [Official Documentation](https://docs.docker.com/machine/install-machine/).
31
29
32
30
## Driver dependency
33
31
34
32
For using docker-machine to create, use and manage the docker host locally, you should have virtualization driver installed in your system. There are different drivers availabe which supports docker-machine depending upon the type of virtualizaiton technology you use. For KVM, docker-machine use docker-machine-driver-kvm where as for Virtualbox it uses virtualbox driver.
Virtualbox uses vboxdrv driver and installation is quite simple than that of KVM. Install virtualbox and you are all set to use docker-machine.
54
+
Virtualbox uses vboxdrv driver and installation is quite simple than that of KVM. Install virtualbox and you are all set to use docker-machine.
57
55
58
56
## Provision of docker host locally
59
57
60
-
To create docker host locally you can simply execute ```docker-machine create docker-vm-name```. This command go forward to create docker virtual machine locally on top of your hypervisor. You can also specify the particular driver for instantiating vm depending upon your requirementsi.e.
58
+
To create docker host locally you can simply execute ```docker-machine create docker-vm-name```. This command goes forward to create docker virtual machine locally on top of your hypervisor. In palce of docker-vm-name I've used vm1 for simplicity. You can also specify the particular driver for instantiating vm depending upon your requirements, for e.g. to use virtualbox driver you can simply append ```virtualbox``` with ```-d``` as a driver option i.e.
You can create as many docker vm as per your requirements. You can use ``` docker-machine ls ``` command to list all the docker machines installed locally. This command also provides information of vm like name, status, driver, state, ip, etc.
65
63
66
-
To start the stoped docker machine enter ``` docker-machine start docker_machine_name ```
64
+
To start the stoped docker_machine, execute:
65
+
66
+
```
67
+
docker-machine start vm1
68
+
```
67
69
68
70
## Running containers on docker machine
69
71
70
-
After creating docker machine you can execute command from the host system to the docker_machine_name. For this you need to connect your shell to the docker machine.i.e.
72
+
After creating docker machine you can execute command from the host system to the vm1. For this you need to connect your shell to the docker machine.i.e.
71
73
72
-
```eval $(docker-machine env docker_vm_name)```
74
+
```eval $(docker-machine env vm1)```
73
75
74
-
Now you can simply execute the commands in newly created docker_docker_vm from your local system. i.e.
76
+
Now you can simply execute the commands in newly created docker_machine_vm from your local system. i.e.
75
77
76
-
```docker run -it --security-opt seccomp:unconfined ubuntu /bin/bash```
78
+
```
79
+
docker run -it --security-opt seccomp:unconfined ubuntu /bin/bash
80
+
```
77
81
78
-
This command pull the ubuntu image in docker_machine_name from the docker reigistry and invoke bash terminal from it.
82
+
This command pull the ubuntu image in vm1 from the docker reigistry and invoke bash terminal from it.
79
83
80
-
You can switch between different docker_machine_vm with the help of ```eval``` command.
84
+
You can switch between different docker virtual machines with the help of ```eval``` command.
0 commit comments