summary refs log tree commit diff
path: root/docker/Dockerfile-dhvirtualenv
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-12-20 11:35:23 +0000
committerRichard van der Hoff <richard@matrix.org>2018-12-20 11:35:23 +0000
commitd3c9c562c60133a2263b36376aa854064630589d (patch)
tree18d0efeecdbc24f33367f87a2a86aa90f854d3ec /docker/Dockerfile-dhvirtualenv
parentAdd 'sandbox' to CSP for media repo (#4284) (diff)
parentDebian packaging via dh_virtualenv (#4285) (diff)
downloadsynapse-d3c9c562c60133a2263b36376aa854064630589d.tar.xz
Debian packaging via dh_virtualenv
Diffstat (limited to 'docker/Dockerfile-dhvirtualenv')
-rw-r--r--docker/Dockerfile-dhvirtualenv35
1 files changed, 35 insertions, 0 deletions
diff --git a/docker/Dockerfile-dhvirtualenv b/docker/Dockerfile-dhvirtualenv
new file mode 100644
index 0000000000..ea6b650af2
--- /dev/null
+++ b/docker/Dockerfile-dhvirtualenv
@@ -0,0 +1,35 @@
+# A dockerfile which builds a docker image for building a debian package for
+# synapse. The distro to build for is passed as a docker build var.
+#
+# The default entrypoint expects the synapse source to be mounted as a
+# (read-only) volume at /synapse/source, and an output directory at /debs.
+#
+# A pair of environment variables (TARGET_USERID and TARGET_GROUPID) can be
+# passed to the docker container; if these are set, the build script will chown
+# the build products accordingly, to avoid ending up with things owned by root
+# in the host filesystem.
+
+# Get the distro we want to pull from as a dynamic build variable
+ARG distro=""
+FROM ${distro}
+
+# Install the build dependencies
+RUN apt-get update -qq -o Acquire::Languages=none \
+    && env DEBIAN_FRONTEND=noninteractive apt-get install \
+        -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
+        build-essential \
+        debhelper \
+        devscripts \
+        dh-systemd \
+        dh-virtualenv \
+        equivs \
+        lsb-release \
+        python3-dev \
+        python3-pip \
+        python3-setuptools \
+        python3-venv \
+        sqlite3 \
+        wget
+
+WORKDIR /synapse/source
+ENTRYPOINT ["bash","/synapse/source/docker/build_debian.sh"]