Skip to content

Instantly share code, notes, and snippets.

@glenpike
Created July 26, 2016 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glenpike/9420a87f552ebd21b0c997b0da7fc7a5 to your computer and use it in GitHub Desktop.
Save glenpike/9420a87f552ebd21b0c997b0da7fc7a5 to your computer and use it in GitHub Desktop.
Vagrant machine to run https://github.com/cyber-dojo/web
#!/usr/bin/env bash
apt-get update
curl -O https://raw.githubusercontent.com/cyber-dojo/web/master/cli/install-docker.sh
chmod +x install-docker.sh
./install-docker.sh
curl -O https://raw.githubusercontent.com/cyber-dojo/web/master/cli/cyber-dojo
chmod +x cyber-dojo
./cyber-dojo up
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8181
config.vm.provision :shell, path: "bootstrap.sh"
end
@glenpike
Copy link
Author

Install Vagrant - https://www.vagrantup.com/docs/installation/
Make a directory, add these 2 files.
Run vagrant up
You'll see yellow & white output from vagrant, then a lot of red & green output from the bootstrap scripts
You should see something like the following to finish:

==> default: Pulling nginx (cyberdojo/nginx:latest)...
==> default: latest: Pulling from cyberdojo/nginx
==> default: Digest: sha256:7ece796907524ab3e0a3a1332bd86396d2e73f1981f1faecf5bd7ece54a2bfb7
==> default: Status: Downloaded newer image for cyberdojo/nginx:latest
==> default: Creating cyber-dojo-web
==> default: Creating cyber-dojo-nginx

Test it is working by opening http://127.0.0.1:8181 in your browser and you should see the "home page" looking like http://cyber-dojo.org

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