Skip to content

Instantly share code, notes, and snippets.

@ghusta
Created January 17, 2018 15:20
Show Gist options
  • Save ghusta/e96f53a546b481a46010be33ec078088 to your computer and use it in GitHub Desktop.
Save ghusta/e96f53a546b481a46010be33ec078088 to your computer and use it in GitHub Desktop.
Create a Docker Machine with Windows, VirtualBox and Boot2Docker with a customized shared folder
rem set MACHINE_STORAGE_PATH=D:\Dev\Docker\.docker\machine
docker-machine version
docker-machine ls
echo creation VM VirtualBox : Docker Machine (Help : docker-machine create --help)
rem var env (ex : proxy) : --engine-env
set VM_NAME=docker-dev
mkdir d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME%
docker-machine create -d "virtualbox" --virtualbox-cpu-count "2" --virtualbox-disk-size "50000" --virtualbox-memory "2048" --virtualbox-share-folder "\\?\d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME%:host-shared" %VM_NAME%
@ghusta
Copy link
Author

ghusta commented Jan 23, 2018

Use sample with jenkins image :

docker run -d -p 8280:8080 --name jenkins2 --restart=always -v /host-shared/jenkins_home:/var/jenkins_home jenkins/jenkins:lts-alpine

@ghusta
Copy link
Author

ghusta commented Sep 23, 2019

See also Specifying configuration options for the created Docker engine, like for configuring the proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment