Add a container to run docker-custodian and install instructions to the README.

This commit is contained in:
Daniel Nephin 2015-08-08 18:11:22 -04:00
parent 4c008ed05a
commit 122e8d8c6e
4 changed files with 58 additions and 1 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.git
.tox
tox.ini
dist

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:3.2
MAINTAINER Daniel Nephin <dnephin@gmail.com>
RUN apk add -U python py-pip
ADD requirements.txt /code/requirements.txt
RUN pip install -r /code/requirements.txt
ADD docker_custodian/ /code/docker_custodian/
ADD setup.py /code/
RUN pip install --no-deps -e /code

View File

@ -1,6 +1,9 @@
.PHONY: all clean tag test
PACKAGE_VERSION=$(shell python setup.py --version)
PACKAGE_VERSION = $(shell python setup.py --version)
DOCKER_REPO ?= ${USER}
BUILD_TAG ?= ${PACKAGE_VERSION}
all: test
@ -16,3 +19,8 @@ test:
tox
tests: test
.PHONY: build
build:
docker build -t ${DOCKER_REPO}/docker-custodian:${BUILD_TAG} .

View File

@ -10,6 +10,41 @@ Keep docker hosts tidy.
.. contents::
:backlinks: none
Install
-------
There are three installation options
Container
~~~~~~~~~
.. code::
docker pull dnephin/docker-custodian
docker run -ti dnephin/docker-custodian dcgc --help
Debian/Ubuntu package
~~~~~~~~~~~~~~~~~~~~~
First build the package (requires `dh-virtualenv`)
.. code:: sh
dpkg-buildpackage -us -uc
Then install it
.. code:: sh
dpkg -i ../docker-custodian_*.deb
Source
~~~~~~
.. code:: sh
pip install git+https://github.com/Yelp/docker-custodian.git
dcgc