-
Vagrantfile
- Utilizes Vagrant and Parallels Desktop
- See: https://github.com/Parallels/boot2docker-vagrant-box
-
boot2docker.fish
- Fish-shell script
$__docker_vagrant_box_dir
: folder for vagrant box, defaults to~/opt/vagrant/docker
, created fromVagrantfile
if not exists. You might want to change it to a different location or use a different vagrant box.function docker
: bring up the vagrant box and run the originaldocker
commandfunction turn_off_docker_vagrant_box
: halt the vagrant box
Last active
August 29, 2015 14:04
-
-
Save dorentus/c2063c9b434496a9d79b to your computer and use it in GitHub Desktop.
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
if not set -q __docker_vagrant_box_dir | |
set -gx __docker_vagrant_box_dir ~/opt/vagrant/docker | |
if not test -e $__docker_vagrant_box_dir/Vagrantfile | |
mkdir -p $__docker_vagrant_box_dir | |
wget 'https://gist.githubusercontent.com/dorentus/c2063c9b434496a9d79b/raw/Vagrantfile' -O $__docker_vagrant_box_dir/Vagrantfile | |
end | |
end | |
function docker | |
if not set -qx DOCKER_HOST | |
pushd $__docker_vagrant_box_dir | |
vagrant up; and set -Ux DOCKER_HOST "tcp://"(vagrant ssh-config | sed -n "s/[ ]*HostName[ ]*//gp")":2375"; | |
popd | |
end | |
command docker $argv | |
end | |
function turn_off_docker_vagrant_box | |
pushd $__docker_vagrant_box_dir | |
vagrant halt; and set -e DOCKER_HOST | |
popd | |
end | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "parallels/boot2docker" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment