Skip to content

Commit

Permalink
Docker build: docs, and Jessie support
Browse files Browse the repository at this point in the history
  • Loading branch information
jhermann committed Jun 13, 2019
1 parent 3eb4341 commit 6eb3046
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ ARG PYVERSION
ARG PKGNAME
ARG DEB_POOL

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

# Uncomment and adapt these ENV instructions to use a local PyPI mirror
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,26 @@ This is also the place where you can put in your own

## How to build and install the package

You need a build machine with all build dependencies installed, specifically
### Building in a Docker container

The easiest way to build the package is using the provided ``Dockerfile.build``.
Then you do not need to install tooling and build dependencies on your machine,
and the package gets built in a pristine environment.
The only thing you need on your workstatioon is a ``docker-ce`` installation of version 17.06 or higher
(either on [Debian](https://docs.docker.com/install/linux/docker-ce/debian/)
or on [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/)).

Call ``./build.sh debian:stretch`` to build the package for *Debian Stretch*
– building for *Debian Jessie* and *Ubuntu Bionic* (with ``./build.sh ubuntu:bionic``) is also supported.
See [Building Debian Packages in Docker](https://dockyard.readthedocs.io/en/latest/packaging-howto.html#dpkg-in-docker)
for more details.

The resulting package files are placed in the ``dist/`` directory.


### Building directly on your workstation

Otherwise, you need a build machine with all build dependencies installed, specifically
[dh-virtualenv](https://github.com/spotify/dh-virtualenv) in addition to the normal Debian packaging tools.
You can get it from [this PPA](https://launchpad.net/~spotify-jyrki/+archive/ubuntu/dh-virtualenv),
the [official Ubuntu repositories](http://packages.ubuntu.com/search?keywords=dh-virtualenv),
Expand Down

0 comments on commit 6eb3046

Please sign in to comment.