This works with everything docker-machine can work on (DigitalOcean, Amazon AWS, virtualbox, local, &c.). N.B. urbit needs at least 2GB of memory or it fails.
My favorite guide is here, but this one is good...and so is this. AWS is a little tricky (due to security groups, &c.), and worth checking out a specific guide.. Also, if you're using Docker Beta on your Mac, this should be helpful if you just want to use docker-machine
locally.
e.g.:
docker-machine create -d digitalocean \
--digitalocean-access-token <ACCESS_TOKEN>
--digitalocean-size 4gb \
--digitalocean-image ubuntu-16-04-x64 \
dobox
In this example, I'm going to use my Digital Ocean box named dobox
.
First, we have to set the right environment vars in our shell:
~ % eval $(docker-machine env dobox)
~ % export DOCKER_API_VERSION=1.23
~ % docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dobox * digitalocean Running tcp://159.203.78.109:2376 v1.11.2
Next, we build then run:
docker-compose build
docker-compose up -d
Once run, we should be able to see it up:
~ % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8bd1216a0317 urbit_planet "bash -c 'cp -rn /urb" 13 hours ago Up 13 hours urbit_planet_1
Finally, we can build our urbit (from the /planet/urbit
directory) with the command bin/urbit -w <planet name> -t <ticket>
OR just make a comet using bin/urbit -c <comet name
>. For more info, see the setup docs. Here, my planet name was fotsev-habnut
and I built the planet like this:
~ % docker exec -it 8bd1216 /bin/bash
root@8bd1216a0317:/urbit# cd /planet
root@8bd1216a0317:/planet# cd urbit/
root@8bd1216a0317:/planet/urbit# bin/urbit -w fotsev-habnut -t <HIDDEN>
Once built, I can attach to the docker instance and boot up my urbit whenever I want!
~ % docker exec -it 8bd1216 /bin/bash
root@8bd1216a0317:/urbit# cd /planet
root@8bd1216a0317:/planet# cd urbit/
root@8bd1216a0317:/planet/urbit# bin/urbit fotsev-habnut
~
urbit: home is fotsev-habnut
loom: mapped 2048MB
protected loom
live: loaded: MB/92.815.360
boot: installed 214 jets
arvo: time: ~2016.7.13..13.00.33..0b64
rest: checkpoint to event 6.850
rest: old 0v1b.0t4qt, new 0v3.8q3om
loaded passcode from fotsev-habnut/.urb/code.~disrys-hilsut
---------------- playback complete----------------
ames: on localhost, UDP 54652.
http: live (insecure, public) on 8080
http: live ("secure", public) on 8443
http: live (insecure, loopback) on 12321
ames: czar zod.urbit.org: ip .104.197.80.248
~fotsev-habnut:talk()
Theres also: https://github.com/paulbellamy/docker-urbit/