├── SPONSORS ├── example ├── run.sh └── Dockerfile ├── README.md ├── Dockerfile ├── Makefile └── LICENSE /SPONSORS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "Hello world" -------------------------------------------------------------------------------- /example/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM progrium/busybox 2 | ADD ./run.sh /tmp/run.sh 3 | CMD ["/tmp/run.sh"] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dockerbuilder 2 | 3 | A Docker container for building Docker containers. It takes an uncompressed tarball of a project source piped to it and runs `docker build` on it. 4 | 5 | ## License 6 | 7 | BSD -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM progrium/busybox 2 | MAINTAINER Jeff Lindsay 3 | 4 | ADD https://get.docker.io/builds/Linux/x86_64/docker-latest /bin/docker 5 | RUN chmod +x /bin/docker 6 | 7 | ADD ./builder /tmp/builder 8 | 9 | USER nobody 10 | ENV DOCKER unix:///tmp/docker.sock 11 | ENTRYPOINT ["/tmp/builder/build"] -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: 3 | docker build -t dockerbuilder . 4 | 5 | tag: 6 | docker tag dockerbuilder progrium/dockerbuilder 7 | 8 | test: 9 | tar -C ./example -cf - . | docker run -i -a stdin -a stdout -v /var/run/docker.sock:/tmp/docker.sock dockerbuilder dockerbuilder-test 10 | docker run --rm dockerbuilder-test 11 | docker rmi dockerbuilder-test -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Jeff Lindsay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------