summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-01-20 08:54:41 +0000
committerTails developers <amnesia@boum.org>2015-01-20 08:54:41 +0000
commit90b08b3ccc8e0880e8be8fa6230494ae5b8d4800 (patch)
tree350f26bc0a98617233af4ff665940a4ccb0a5e48
parent8ac780779c68f6e5e6c0bffbdb144ec8b4190421 (diff)
Import initial Docker support patch.
Thanks to jvoisin!
-rw-r--r--Dockerfile30
-rw-r--r--Makefile14
-rw-r--r--setup_container22
3 files changed, 66 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4a07fe1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,30 @@
+FROM debian:jessie
+MAINTAINER amnesia@boum.org
+
+ADD setup_container /root/setup_container
+RUN bash /root/setup_container
+
+RUN apt-get update && \
+ apt-get install --assume-yes --no-install-recommends \
+ --allow-unauthenticated \
+ bash \
+ cpio \
+ dpkg-dev \
+ eatmydata/squeeze-backports \
+ git \
+ ikiwiki \
+ intltool \
+ libdpkg-perl \
+ libyaml-perl \
+ libyaml-syck-perl \
+ live-build/builder-wheezy \
+ perlmagick \
+ po4a \
+ syslinux \
+ time \
+ wget \
+ whois
+
+WORKDIR /root/tails
+ENTRYPOINT ["/bin/bash", "-l", "-c"]
+CMD []
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..45f7bb5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
+DOCKER_IMAGE_NAME := "tails$(if $(CURRENT_BRANCH),-$(CURRENT_BRANCH))"
+DOCKER_MOUNT := "$(shell pwd):/root/tails"
+DOCKER_RUN := docker run --rm --privileged -v $(DOCKER_MOUNT) -t $(DOCKER_IMAGE_NAME)
+
+default: all
+
+all: env image
+
+image:
+ $(DOCKER_RUN) "lb clean --all && lb config && lb build"
+
+env:
+ docker build -t "$(DOCKER_IMAGE_NAME)" .
diff --git a/setup_container b/setup_container
new file mode 100644
index 0000000..0a294f2
--- /dev/null
+++ b/setup_container
@@ -0,0 +1,22 @@
+cat <<EOF >> /etc/apt/sources.list
+
+deb http://http.debian.net/debian unstable main
+deb-src http://http.debian.net/debian unstable main
+
+deb http://backports.debian.org/debian-backports squeeze-backports main
+deb http://deb.tails.boum.org/ builder-wheezy main
+EOF
+
+cat <<EOF > /etc/apt/preferences.d/tails.pref
+Package: *
+Pin: release a=unstable
+Pin-Priority: 500
+EOF
+
+mkdir /etc/live
+cat <<EOF > /etc/live/build.conf
+LB_PARENT_MIRROR_BINARY="http://ftp.us.debian.org/debian/"
+LB_MIRROR_BINARY="http://ftp.us.debian.org/debian/"
+EOF
+
+echo -e '\nexport TAILS_BUILD_OPTIONS="noproxy"' >> /etc/profile