kops/docker
Zach Loafman 39301f469b CI: Add container build
Add a simple Dockerfile that can build kops, and a short README on how
to build it. This generates a 425M image, which is about as tight as I
could get it in a short amount of work without just busting apart the
golang:1.6-alpine image to compress the Go layer itself. It's good
enough for what I'm planning to use it for: CI builds.

Along the way: Fix-up .gitignore to include more from k8s/.gitignore
(include editor ones, and terraform output dir).
2016-08-15 17:08:11 -07:00
..
Dockerfile CI: Add container build 2016-08-15 17:08:11 -07:00
README.md CI: Add container build 2016-08-15 17:08:11 -07:00

README.md

Running Kops in Docker

The Dockerfile here is offered primarily as a way to build continuous integration versions of kops until we figure out how we want to release/package it.

To use it, e.g. (assumes your $HOME is correct and that $KOPS_STATE_STORE is correct):

$ docker build -t kops .
$ KOPS="docker run -v $HOME/.aws:/root/.aws:ro -v $HOME/.ssh:/root/.ssh:ro -v $HOME/.kube:/root/.kube -it kops kops --state=$KOPS_STATE_STORE"

This creates a shell variable that runs the kops container with ~/.aws mounted in (for AWS credentials), ~/.ssh mounted in (for SSH keys, for AWS specifically), and ~/.kube mounted in (so kubectl can add newly created clusters).

After this, you can just use $KOPS where you would generally use kops, e.g. $KOPS get cluster.