From 30380b64e37b275854553668a4fa32be7fc4a11d Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 20 Feb 2018 20:36:13 -0500 Subject: Add docker file for building app image The official, signed AppImage will be build locally for now for security of my key, but I still want it to be built in a clean, controlled environment based off a suitably old Linux distribution for maximal portability in the AppImage. --- appimage/Dockerfile | 11 +++++++++++ appimage/entrypoint | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 appimage/Dockerfile create mode 100755 appimage/entrypoint (limited to 'appimage') diff --git a/appimage/Dockerfile b/appimage/Dockerfile new file mode 100644 index 00000000..d0efc672 --- /dev/null +++ b/appimage/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:14.04 +RUN apt-get update && \ + apt-get -y install screen autoconf git \ + build-essential zlib1g-dev libjpeg-dev \ + docbook-xsl fop xsltproc \ + imagemagick wget fuse && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* +COPY entrypoint /entrypoint +RUN chmod +x /entrypoint +ENTRYPOINT [ "/entrypoint" ] diff --git a/appimage/entrypoint b/appimage/entrypoint new file mode 100755 index 00000000..458a3acf --- /dev/null +++ b/appimage/entrypoint @@ -0,0 +1,22 @@ +#!/bin/bash +set -e +if [ $(id -u) = 0 ]; then + if [ ! -d /tmp/build/.gnupg ]; then + echo "/tmp/build must exist and must contain .gnupg" + exit 2 + fi + id=$(stat -c %u /tmp/build) + adduser --home /tmp/build --no-create-home --uid $id --disabled-password --gecos build build + exec sudo -iu build $0 "$@" +fi + +cd /tmp/build +if [ ! -d qpdf ]; then + if [ "$1" == "" ]; then + echo "A repository and optional git clone arguments must be given" + exit 2 + fi + git clone "$@" qpdf +fi +cd qpdf +./appimage/build-appimage --sign -- cgit v1.2.3-54-g00ecf