From 44e87d7cf29276ec002ae5c4766c9dc6c3e4b921 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 Use Debian stretch packaged gosu, as recommended in the documentation: https://github.com/tianon/gosu/blob/master/INSTALL.md to avoid GPG key issues. --- web-wasm/Dockerfile.in | 49 ++++++++++++++++++++++++++++++++++- web-wasm/install-gosu-sudo.sh | 16 ++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100755 web-wasm/install-gosu-sudo.sh diff --git a/web-wasm/Dockerfile.in b/web-wasm/Dockerfile.in index 39688f5..8291014 100644 --- a/web-wasm/Dockerfile.in +++ b/web-wasm/Dockerfile.in @@ -5,7 +5,54 @@ 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 install-gosu-sudo.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 \ + gosu \ + 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-sudo.sh && \ + rm -rf /buildscripts #include "common.docker" diff --git a/web-wasm/install-gosu-sudo.sh b/web-wasm/install-gosu-sudo.sh new file mode 100755 index 0000000..7f15307 --- /dev/null +++ b/web-wasm/install-gosu-sudo.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# verify that the binary works +gosu nobody true + + +cat << EOF >> /usr/bin/sudo +#!/bin/sh + +# Emulate the sudo command + +exec gosu root:root "\$@" + +EOF + +chmod +x /usr/bin/sudo