起因

想要分享檔案在VM跟電腦,其實VBOX本身有點麻煩.比起VBOX,vagrant反而提供比較簡單的方式.

步驟

//Check vagrant box list
vagrant list

//init
vagrant init ubuntu/trusty64

//update for vagrant shared folder
// editing Vagrantfile
//  --> config.vm.synced_folder "./data", "/vagrant_data"

//startup
vagrant up

//login
vagrant ssh


//Save bot
vagrant package --output BOT_NAME


//Install about basic component
sudo apt-get install build-essential openssl
sudo apt-get install -y pkg-config
sudo apt-get install -y libcairo2-dev

//Install about docker
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
//edit /etc/apt/sources.list.d/docker.list
// deb https://apt.dockerproject.org/repo ubuntu-wily main

sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
sudo apt-get install docker-engine
sudo service docker start
 
//Docker-compose
curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

//Docker-machine
curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine

//Install npm
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo apt-get update
sudo apt-get install nodejs-legacy
sudo apt-get install npm

//Install npm related 
npm install -g node-gyp

Refer


Buy Me A Coffee

Evan

Attitude is everything