Skip to content

Commit

Permalink
web-wasm: Bump Emscripten to 1.38.24
Browse files Browse the repository at this point in the history
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:

  nodejs/docker-node#922
  • Loading branch information
thewtex committed Jan 20, 2019
1 parent d9412b3 commit 12580c1
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
16 changes: 10 additions & 6 deletions imagefiles/install-gosu-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -21,17 +25,17 @@ 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

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
Expand Down
48 changes: 47 additions & 1 deletion web-wasm/Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,53 @@ MAINTAINER Matt McCormick "[email protected]"
# 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"

Expand Down

0 comments on commit 12580c1

Please sign in to comment.