Skip to content

Commit 6eb3046

Browse files
committed
Docker build: docs, and Jessie support
1 parent 3eb4341 commit 6eb3046

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

Dockerfile.build

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ ARG PYVERSION
2222
ARG PKGNAME
2323
ARG DEB_POOL
2424

25-
# Install build tools and package build deps including nodejs
26-
RUN env LANG=C apt-get update -qq -o Acquire::Languages=none \
25+
# Install build tools and package build deps
26+
RUN sed -i,orig 's/^\(.*jessie-updates\)/#\1/' /etc/apt/sources.list \
27+
&& env LANG=C apt-get update -qq -o Acquire::Languages=none \
2728
&& env LANG=C DEBIAN_FRONTEND=noninteractive apt-get install \
2829
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
2930
\
@@ -43,7 +44,7 @@ RUN env LANG=C apt-get update -qq -o Acquire::Languages=none \
4344
python${PYVERSION}-pkg-resources \
4445
python${PYVERSION}-setuptools \
4546
python-virtualenv \
46-
sphinx-rtd-theme-common \
47+
$(apt-cache search sphinx-rtd-theme-common | cut -f1 -d' ') \
4748
tar \
4849
\
4950
libcurl4-openssl-dev \
@@ -63,6 +64,13 @@ RUN env LANG=C apt-get update -qq -o Acquire::Languages=none \
6364
libldap2-dev \
6465
libpq-dev \
6566
libsasl2-dev \
67+
&& if grep -q VERSION.*jessie /etc/os-release ; then \
68+
echo "deb http://archive.debian.org/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list \
69+
&& apt-get update -o Acquire::Check-Valid-Until=false \
70+
&& env LANG=C DEBIAN_FRONTEND=noninteractive apt-get install \
71+
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
72+
-t jessie-backports cmake ; \
73+
fi \
6674
&& apt-get clean && rm -rf "/var/lib/apt/lists"/*
6775

6876
# Uncomment and adapt these ENV instructions to use a local PyPI mirror

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,26 @@ This is also the place where you can put in your own
5858

5959
## How to build and install the package
6060

61-
You need a build machine with all build dependencies installed, specifically
61+
### Building in a Docker container
62+
63+
The easiest way to build the package is using the provided ``Dockerfile.build``.
64+
Then you do not need to install tooling and build dependencies on your machine,
65+
and the package gets built in a pristine environment.
66+
The only thing you need on your workstatioon is a ``docker-ce`` installation of version 17.06 or higher
67+
(either on [Debian](https://docs.docker.com/install/linux/docker-ce/debian/)
68+
or on [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/)).
69+
70+
Call ``./build.sh debian:stretch`` to build the package for *Debian Stretch*
71+
– building for *Debian Jessie* and *Ubuntu Bionic* (with ``./build.sh ubuntu:bionic``) is also supported.
72+
See [Building Debian Packages in Docker](https://dockyard.readthedocs.io/en/latest/packaging-howto.html#dpkg-in-docker)
73+
for more details.
74+
75+
The resulting package files are placed in the ``dist/`` directory.
76+
77+
78+
### Building directly on your workstation
79+
80+
Otherwise, you need a build machine with all build dependencies installed, specifically
6281
[dh-virtualenv](https://github.com/spotify/dh-virtualenv) in addition to the normal Debian packaging tools.
6382
You can get it from [this PPA](https://launchpad.net/~spotify-jyrki/+archive/ubuntu/dh-virtualenv),
6483
the [official Ubuntu repositories](http://packages.ubuntu.com/search?keywords=dh-virtualenv),

0 commit comments

Comments
 (0)