Skip to content

Commit

Permalink
Add docker debbuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barnaby Gray committed Feb 14, 2014
1 parent 815cf2f commit 12b3a2b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker/debbuild/Dockerfile
@@ -0,0 +1,16 @@
# Deb build file
# docker build -t logcabin-debbuild docker/debbuild
# docker run -t -i -e PACKAGE=https://pypi.python.org/packages/package.tar.gz -v $HOME/.gnupg:/root/.gnupg logcabin-debbuild
# CONTAINER=$(docker ps -q -a | head -1)
# docker cp $CONTAINER:/tmp/build/deb_dist/logcabin_1.0.x-1_all.deb .
FROM ubuntu:12.04
MAINTAINER Barnaby Gray <barnaby@pickle.me.uk>

RUN apt-get update && apt-get install -y dput python-stdeb devscripts wget && apt-get clean
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get install -y python-pip
RUN pip install versiontools
ADD . /

ENV HOME /root
CMD ./build.sh
14 changes: 14 additions & 0 deletions docker/debbuild/build.sh
@@ -0,0 +1,14 @@
#!/bin/bash -e

: ${PACKAGE:?must be set}

BASENAME=$(basename $PACKAGE)
DIRNAME=${BASENAME%.tar.gz}

mkdir /tmp/build
cd /tmp/build
wget $PACKAGE

py2dsc -x /stdeb.cfg $BASENAME
cd deb_dist/$DIRNAME
dpkg-buildpackage
2 changes: 2 additions & 0 deletions docker/debbuild/stdeb.cfg
@@ -0,0 +1,2 @@
[DEFAULT]
Package: logcabin

0 comments on commit 12b3a2b

Please sign in to comment.