- Run Docker Toolbox from shortcut Docker Quickstart Terminal
- Shutdown boot2docker
docker-machine stop
- Open VirtualBox and goto Settings of default machine
- At Shared Folders menu, click + icon, Select folder path to drive D: and set folder name is d, checked all options
- Copy attach-drive-d.sh script to Docker Toolbox folder (C:\Program Files\Docker Toolbox)
- Edit start.sh add command
sh attach-drive-d.sh
before finalize step - Run Docker Toolbox from shortcut Docker Quickstart Terminal again
- Have fun!!!
Created
December 29, 2016 02:21
-
-
Save first087/2214c81114f190271d26c3e88da36104 to your computer and use it in GitHub Desktop.
Script for attach drive D: into Docker Toolbox for Windows
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
#!/bin/bash | |
if [ "${VM}" == "default" ]; then | |
"${DOCKER_MACHINE}" ssh "${VM}" "sudo mkdir -p /d/" | |
"${DOCKER_MACHINE}" ssh "${VM}" "sudo mount -t vboxsf -o defaults,uid=\$(id -u docker),gid=\$(id -g docker) d /d/" | |
fi |
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
# Add script before finalize step | |
sh attach-drive-d.sh | |
STEP="Finalize" | |
# ... |
if it is c drive which i have to add, how do i do that? can i map it to C Drive?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test on Docker Toolbox 1.12.3 (boot2docker 1.12.5), can bypass step 5-6.