-
-
Save aharpervc/daadb46a180fce535857a0fc17adb34a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11:06 AM] [~\workspace] | |
$ mkdir test_docker_volume | |
Directory: C:\users\aharper\workspace | |
Mode LastWriteTime Length Name | |
---- ------------- ------ ---- | |
d----- 5/25/2016 11:07 AM test_docker_volume | |
[11:07 AM] [~\workspace] | |
$ cd .\test_docker_volume\ | |
[11:07 AM] [~\workspace\test_docker_volume] | |
$ echo "hello docker" > hello_docker.txt | |
[11:07 AM] [~\workspace\test_docker_volume] | |
$ dir | |
Directory: C:\users\aharper\workspace\test_docker_volume | |
Mode LastWriteTime Length Name | |
---- ------------- ------ ---- | |
-a---- 5/25/2016 11:07 AM 30 hello_docker.txt | |
[11:07 AM] [~\workspace\test_docker_volume] | |
$ docker-machine create test-machine | |
Running pre-create checks... | |
Creating machine... | |
(test-machine) Copying C:\Users\aharper\.docker\machine\cache\boot2docker.iso to C:\Users\aharper\.docker\machine\machines\test-machine\boot2docker.iso... | |
(test-machine) Creating SSH key... | |
(test-machine) Creating VM... | |
(test-machine) Using switch "Hyper-V: USB Ethernet" | |
(test-machine) Creating VHD | |
(test-machine) Starting VM... | |
(test-machine) Waiting for host to start... | |
Waiting for machine to be running, this may take a few minutes... | |
Detecting operating system of created instance... | |
Waiting for SSH to be available... | |
Detecting the provisioner... | |
Provisioning with boot2docker... | |
Copying certs to the local machine directory... | |
Copying certs to the remote machine... | |
Setting Docker configuration on the remote daemon... | |
Checking connection to Docker... | |
Docker is up and running! | |
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Users\aharper\utilities\docker-machine.exe env test-machine | |
[11:10 AM] [~\workspace\test_docker_volume] | |
$ docker-machine env test-machine | |
$Env:DOCKER_TLS_VERIFY = "1" | |
$Env:DOCKER_HOST = "tcp://192.168.250.113:2376" | |
$Env:DOCKER_CERT_PATH = "C:\Users\aharper\.docker\machine\machines\test-machine" | |
$Env:DOCKER_MACHINE_NAME = "test-machine" | |
# Run this command to configure your shell: | |
# & "C:\Users\aharper\utilities\docker-machine.exe" env test-machine | Invoke-Expression | |
[11:11 AM] [~\workspace\test_docker_volume] | |
$ & "C:\Users\aharper\utilities\docker-machine.exe" env test-machine | Invoke-Expression | |
[11:15 AM] [~\workspace\test_docker_volume] | |
$ docker run -i -t -v /c/users/aharper/workspace_test_docker_volume:/whatever ubuntu /bin/bash | |
Unable to find image 'ubuntu:latest' locally | |
latest: Pulling from library/ubuntu | |
6d28225f8d96: Pull complete | |
166102ec41af: Pull complete | |
d09bfba2bd6a: Pull complete | |
c80dad39a6c0: Pull complete | |
a3ed95caeb02: Pull complete | |
Digest: sha256:5718d664299eb1db14d87db7bfa6945b28879a67b74f36da3e34f5914866b71c | |
Status: Downloaded newer image for ubuntu:latest | |
root@58a3cf29358b:/# ls -la | |
total 72 | |
drwxr-xr-x 34 root root 4096 May 25 15:19 . | |
drwxr-xr-x 34 root root 4096 May 25 15:19 .. | |
-rwxr-xr-x 1 root root 0 May 25 15:19 .dockerenv | |
drwxr-xr-x 2 root root 4096 May 3 15:53 bin | |
drwxr-xr-x 2 root root 4096 Apr 12 20:14 boot | |
drwxr-xr-x 5 root root 380 May 25 15:19 dev | |
drwxr-xr-x 44 root root 4096 May 25 15:19 etc | |
drwxr-xr-x 2 root root 4096 Apr 12 20:14 home | |
drwxr-xr-x 8 root root 4096 Sep 13 2015 lib | |
drwxr-xr-x 2 root root 4096 May 3 15:52 lib64 | |
drwxr-xr-x 2 root root 4096 May 3 15:52 media | |
drwxr-xr-x 2 root root 4096 May 3 15:52 mnt | |
drwxr-xr-x 2 root root 4096 May 3 15:52 opt | |
dr-xr-xr-x 101 root root 0 May 25 15:19 proc | |
drwx------ 2 root root 4096 May 3 15:52 root | |
drwxr-xr-x 4 root root 4096 May 3 15:52 run | |
drwxr-xr-x 2 root root 4096 May 3 23:12 sbin | |
drwxr-xr-x 2 root root 4096 May 3 15:52 srv | |
dr-xr-xr-x 13 root root 0 May 25 15:19 sys | |
drwxrwxrwt 2 root root 4096 May 3 15:53 tmp | |
drwxr-xr-x 11 root root 4096 May 3 23:12 usr | |
drwxr-xr-x 13 root root 4096 May 3 23:12 var | |
drwxr-xr-x 2 root root 40 May 25 15:19 whatever | |
root@58a3cf29358b:/# cd whatever/ | |
root@58a3cf29358b:/whatever# ls -la | |
total 4 | |
drwxr-xr-x 2 root root 40 May 25 15:19 . | |
drwxr-xr-x 34 root root 4096 May 25 15:19 .. | |
root@58a3cf29358b:/whatever# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment