FROM debian:testing # Install generic dependencies to build jss RUN true \ && apt-get update \ && apt-get dist-upgrade -y \ && apt-get install -y apt-utils debhelper libnss3-dev libnss3-tools libnss3 \ default-jdk pkg-config quilt g++ mercurial \ zlib1g-dev libslf4j-java liblog4j2-java \ libcommons-lang-java libjaxb-api-java cmake \ zip unzip junit4 \ && apt-get build-dep nss nspr jss -y \ && mkdir -p /home/sandbox \ && apt-get clean -y all \ && rm -rf /usr/share/doc /usr/share/doc-base \ /usr/share/man /usr/share/locale /usr/share/zoneinfo \ && true # Link in the current version of jss from the git repository WORKDIR /home/sandbox COPY . /home/sandbox/jss # Download and build NSPR and NSS RUN true \ && cd /home/sandbox \ && hg clone https://hg.mozilla.org/projects/nspr \ && hg clone https://hg.mozilla.org/projects/nss \ && cd nss \ && ./build.sh --enable-fips --enable-libpkix \ && true # Perform the actual build WORKDIR /home/sandbox/jss CMD true \ && export SANDBOX=1 \ && rm -rf build \ && mkdir build \ && cd build \ && CFLAGS="-Wall -Wextra -Werror -Og -ggdb" cmake -DCMAKE_BUILD_TYPE=Debug .. \ && make all \ && ctest --output-on-failure \ && true