diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..50f6cee --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:2.7 + +RUN apt-get update && \ + apt-get -yqq install build-essential ruby-dev ruby git python-pip libxml2-dev libxslt-dev libffi-dev libmysqlclient-dev libpq-dev + +RUN gem install --no-ri --no-rdoc fpm + +ADD https://get.docker.com/builds/Linux/x86_64/docker-latest /usr/local/bin/docker + +RUN chmod +x /usr/local/bin/docker + +ADD . /giftwrap + +WORKDIR /giftwrap + +RUN python setup.py install + +CMD giftwrap build -m /tmp/manifest.yml diff --git a/README.md b/README.md index ab5803c..5906653 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,28 @@ giftwrap is pretty simple. The basic flow is something like this: 8. giftwrap will check [devstack](https://devstack.org) for the system dependencies necessary for that project (to be done) 9. An [fpm](https://github.com/jordansissel/fpm) package will be built from the intersection of the python install and system dependencies +DockerDockerDockerDockerDocker +------------------------------ + +This shows how to use docker-in-docker to build packages really fast. the example shows doing it within the provided vagrant instance. but this is for illustration purposes, it should be runnable from any machine with docker installed. + + +Build a giftwrap docker container like this: + +``` +$ docker build -t bluebox/giftwrap . +``` + +Run the giftwrap docker image and map in your docker socket and your manifest file: + +``` +$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /vagrant/sample.yml:/tmp/manifest.yml bluebox/giftwrap +$ docker images openstack-9.0 +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +openstack-9.0 bbc6 44c37c8d9672 10 minutes ago 499.5 MB + +``` + TODO ---- * Provide option for source removal; package only the executables @@ -75,9 +97,11 @@ License |:---------------------|:---------------------------------------------------| | **Authors** | John Dewey () | | | Craig Tracey () | +| | Paul Czarkowski () | | | | | **Copyright** | Copyright (c) 2014, John Dewey | | | Copyright (c) 2014, Craig Tracey | +| | Copyright (c) 2014, Paul Czarkowski | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.