summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-01-21 13:20:47 +0100
committerTails developers <amnesia@boum.org>2015-01-21 17:01:50 +0100
commit90bde0e32866f86b28b844451f63f40e6ebc0df8 (patch)
tree6db19704fe79fc8bf450f11fd2a366f47f01074f
parent426d9490e3dee6cff492ae8f58c79087c59e18d1 (diff)
Move tails_builder's files into its own sub-folder.
We're gonna deal with multiple Docker contexts (the builder's, and an apt cacher's) so this will make things more organized.
-rw-r--r--.gitignore3
-rw-r--r--Makefile14
-rw-r--r--docker/tails_builder/Dockerfile (renamed from Dockerfile)10
-rw-r--r--docker/tails_builder/provision/assets/apt/preferences (renamed from docker/provision/assets/apt/preferences)0
-rw-r--r--docker/tails_builder/provision/assets/apt/sources.list (renamed from docker/provision/assets/apt/sources.list)0
-rw-r--r--docker/tails_builder/provision/assets/live-build/build.conf (renamed from docker/provision/assets/live-build/build.conf)0
-rwxr-xr-xdocker/tails_builder/provision/assets/scripts/build-tails (renamed from docker/provision/assets/scripts/build-tails)0
7 files changed, 20 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index e7f386e..2dcc4ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,3 +49,6 @@
# Files generated during the test suite
/features/misc_files/video.mp4
+
+# Needed by Docker
+/docker/tails_builder/provision/assets/apt/deb.tails.boum.org.key
diff --git a/Makefile b/Makefile
index 4eeb910..033c880 100644
--- a/Makefile
+++ b/Makefile
@@ -14,5 +14,15 @@ iso_image:
containers: builder_container
-builder_container:
- docker build -t "$(BUILDER_IMAGE)" .
+builder_container: copy_tails_apt_key
+ docker build -t "$(BUILDER_IMAGE)" docker/tails_builder
+
+# Docker cannot COPY files from outside of its context (i.e. where the
+# Dockerfile is stored) so we have to make it available in there while
+# being careful its not a symlink, hence the `--dereference`. Also
+# note that `--preserve=all` is crucial to prevent Docker from always
+# rebuilding the tails_builder image since e.g. a new mtime in a
+# COPY-source will be detected by Docker.
+copy_tails_apt_key:
+ cp --dereference --preserve=all config/chroot_sources/tails.chroot.gpg \
+ "docker/$(BUILDER_IMAGE)/provision/assets/apt/deb.tails.boum.org.key"
diff --git a/Dockerfile b/docker/tails_builder/Dockerfile
index 2402fb3..2778820 100644
--- a/Dockerfile
+++ b/docker/tails_builder/Dockerfile
@@ -1,9 +1,9 @@
FROM debian:wheezy
MAINTAINER tails@boum.org
-COPY config/chroot_sources/tails.chroot.gpg /tmp/deb.tails.boum.org.key
-COPY docker/provision/assets/apt/sources.list /etc/apt/sources.list
-COPY docker/provision/assets/apt/preferences /etc/apt/preferences.d/tails
+COPY provision/assets/apt/deb.tails.boum.org.key /tmp/deb.tails.boum.org.key
+COPY provision/assets/apt/sources.list /etc/apt/sources.list
+COPY provision/assets/apt/preferences /etc/apt/preferences.d/tails
RUN apt-key add /tmp/deb.tails.boum.org.key && \
apt-get update && \
@@ -30,8 +30,8 @@ RUN apt-key add /tmp/deb.tails.boum.org.key && \
wget \
whois
-COPY docker/provision/assets/live-build/build.conf /etc/live/build.conf
-COPY docker/provision/assets/scripts/build-tails /usr/sbin/build-tails
+COPY provision/assets/live-build/build.conf /etc/live/build.conf
+COPY provision/assets/scripts/build-tails /usr/sbin/build-tails
WORKDIR /root/tails
ENTRYPOINT ["/bin/bash", "-l", "-c"]
diff --git a/docker/provision/assets/apt/preferences b/docker/tails_builder/provision/assets/apt/preferences
index 4b685fc..4b685fc 100644
--- a/docker/provision/assets/apt/preferences
+++ b/docker/tails_builder/provision/assets/apt/preferences
diff --git a/docker/provision/assets/apt/sources.list b/docker/tails_builder/provision/assets/apt/sources.list
index 8b9efce..8b9efce 100644
--- a/docker/provision/assets/apt/sources.list
+++ b/docker/tails_builder/provision/assets/apt/sources.list
diff --git a/docker/provision/assets/live-build/build.conf b/docker/tails_builder/provision/assets/live-build/build.conf
index 1467296..1467296 100644
--- a/docker/provision/assets/live-build/build.conf
+++ b/docker/tails_builder/provision/assets/live-build/build.conf
diff --git a/docker/provision/assets/scripts/build-tails b/docker/tails_builder/provision/assets/scripts/build-tails
index c3c15c1..c3c15c1 100755
--- a/docker/provision/assets/scripts/build-tails
+++ b/docker/tails_builder/provision/assets/scripts/build-tails