From 12580c1815757b50cac5e049e8a8c4d4c8291ef5 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 20 Jan 2019 12:59:32 -0500 Subject: [PATCH] web-wasm: Bump Emscripten to 1.38.24 The base image moved from jessie to stretch, so update sources and packages. Also update gosu binary install to support gpg2 and work around: gpg: cannot open '/dev/tty': No such device or address as suggested here: https://github.com/nodejs/docker-node/issues/922 --- imagefiles/install-gosu-binary.sh | 16 +++++++---- web-wasm/Dockerfile.in | 48 ++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 7 deletions(-) diff --git a/imagefiles/install-gosu-binary.sh b/imagefiles/install-gosu-binary.sh index 61d74cfa..58b451b9 100755 --- a/imagefiles/install-gosu-binary.sh +++ b/imagefiles/install-gosu-binary.sh @@ -8,8 +8,12 @@ if ! command -v curl &> /dev/null; then exit 1 fi -if ! command -v gpg &> /dev/null; then - echo >&2 'error: "gpg" not found!' +GPG=gpg +if command -v gpg2 &> /dev/null; then + GPG=gpg2 +fi +if ! command -v $GPG &> /dev/null; then + echo >&2 "error: $GPG not found!" exit 1 fi @@ -21,9 +25,9 @@ url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$ # download and verify the signature export GNUPGHOME="$(mktemp -d)" -gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ -gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ -gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +$GPG --batch --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ +$GPG --batch --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ +$GPG --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 echo "Downloading $url" curl -o /usr/local/bin/gosu -# -SL $url @@ -31,7 +35,7 @@ curl -o /usr/local/bin/gosu -# -SL $url echo "Downloading $url_key" curl -o /usr/local/bin/gosu.asc -# -SL $url_key -gpg --verify /usr/local/bin/gosu.asc +$GPG --verify /usr/local/bin/gosu.asc # cleanup rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc diff --git a/web-wasm/Dockerfile.in b/web-wasm/Dockerfile.in index 39688f5a..f52eb478 100644 --- a/web-wasm/Dockerfile.in +++ b/web-wasm/Dockerfile.in @@ -5,7 +5,53 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com" # See https://github.com/asRIA/emscripten-docker/blob/master/Dockerfile.in#L4 RUN rm /bin/sh && ln -s /bin/dash /bin/sh -#include "common.debian" +COPY imagefiles/install-gosu-binary.sh /buildscripts/ + +ARG DEBIAN_FRONTEND=noninteractive +ARG REPO=http://cdn-fastly.deb.debian.org + +RUN \ + bash -c "echo \"deb $REPO/debian stretch main contrib non-free\" > /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian stretch-updates main contrib non-free\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian-security stretch/updates main\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb http://ftp.debian.org/debian stretch-backports main\" >> /etc/apt/sources.list" && \ + apt-get update --yes && \ + apt-get install --no-install-recommends --yes \ + automake \ + autogen \ + bash \ + build-essential \ + bc \ + bzip2 \ + ca-certificates \ + curl \ + dirmngr \ + file \ + gettext \ + gnupg2 \ + gzip \ + zip \ + make \ + ncurses-dev \ + pkg-config \ + libtool \ + python \ + python-pip \ + rsync \ + sed \ + ssh \ + bison \ + flex \ + tar \ + pax \ + vim \ + wget \ + xz-utils \ + zlib1g-dev \ + && \ + apt-get clean --yes && \ + /buildscripts/install-gosu-binary.sh && \ + rm -rf /buildscripts #include "common.docker"