# A Docker container that builds the server deb.
# Template release for grr-responses-templates must be done before building the
# server deb.
# See here for build instructions:
# Building on xenial gets us Python 2.7.11
MAINTAINER Greg Castle firstname.lastname@example.org
# The 32bit libs listed here are required for PyInstaller, which isn't used on
# the server but picked up by the deb library checker as missing. PyInstaller is
# a client python package dependency and we need that package for the
# ClientBuild entry point for repacking. Disabling the library check might
# result in missing something important. Adding the build deps here seems like
# the least bad option.
RUN apt-get update && \
apt-get install -y \
zip && \
pip install --upgrade pip && \
pip install virtualenv && \
pip install --upgrade setuptools && \
# Pull dependencies and templates from pypi and build wheels into a temp
# virtualenv. All we are doing here is populating the pip cache so it can be
# cached by docker and make the server build go fast.
RUN . /tmp/grr-env/bin/activate && \
pip install wheel && \
pip install --pre grr-response-server && \
pip install -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates && \
# Copy the GRR code over and build the deb. This will create a fresh virtualenv
# and install from src, but re-use the precompiled wheels via pip and docker
COPY . /usr/src/grr/
# You may see SyntaxError: invalid syntax from pexpect, this seems to be
# harmless since this code is only used when building clients from source:
RUN dpkg-buildpackage -us -uc