Skip to content

Instantly share code, notes, and snippets.

@magnuspalmer
Created September 22, 2016 09:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnuspalmer/913e2fdac6be4b651e3f1e55e7972be0 to your computer and use it in GitHub Desktop.
Save magnuspalmer/913e2fdac6be4b651e3f1e55e7972be0 to your computer and use it in GitHub Desktop.
Rancher scratchpad

Setup Rancher on windows for fun and work (and probably Linux as well)

Create a network - ranchernet

docker network create --subnet 173.18.0.0/16 ranchernet

Start the server, use the ranchernet and assign static IP

docker run -d --restart=always --net ranchernet --ip=173.18.0.2 -p 8080:8080 rancher/server

Through the Rancher UI, get the command, but add it also to the rancher net and give static ip

docker run -e CATTLE_AGENT_IP="173.18.0.3" --net ranchernet --ip 173.18.0.3 -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 http://173.18.0.2:8080/v1/scripts/<value-from-ui>

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