Created
January 19, 2015 14:51
-
-
Save tkdn/7fcf3427978a0d2745e7 to your computer and use it in GitHub Desktop.
Vagrant+Docker してホストOSのWinでもSyncしたい ref: http://qiita.com/tkdn/items/00da52f5545436b055f3
This file contains hidden or 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
$ git clone https://github.com/coreos/coreos-vagrant.git |
This file contains hidden or 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
$ cd coreos-vagrant | |
$ vagrnt up |
This file contains hidden or 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
$ vagrant ssh | |
ここからゲストOS | |
core@core-01 $ docker run -d \ | |
-p 80:80 \ | |
-p 443:443 \ | |
-p 3306:3306 \ | |
-v /app:/var/www/html \ | |
-v /data/mysql:/var/lib/mysql \ | |
-e MYSQL_PASS="password" \ | |
--name joomla \ | |
dell/joomla |
This file contains hidden or 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
$ scp -r -i ~/vagrant.d/insecure_private_key core@core-01:/app ./ |
This file contains hidden or 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
$ vagrant rsync-auto |
This file contains hidden or 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
$ vagrant plugin install vagrant-rsync-back | |
$ vagrant rsync-back |
This file contains hidden or 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
ip = "172.17.8.#{i+100}" | |
config.vm.network :private_network, type: "dhcp", ip: ip | |
config.vm.network :public_network, type: "dhcp" |
This file contains hidden or 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
config.vm.synced_folder "./app", "/app", type: "rsync" | |
config.vm.synced_folder "./data", "/data", type: "rsync" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment