summaryrefslogtreecommitdiff
path: root/libc/ci/docker/wasm32-unknown-emscripten
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ci/docker/wasm32-unknown-emscripten')
-rw-r--r--libc/ci/docker/wasm32-unknown-emscripten/Dockerfile21
-rwxr-xr-xlibc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh11
2 files changed, 32 insertions, 0 deletions
diff --git a/libc/ci/docker/wasm32-unknown-emscripten/Dockerfile b/libc/ci/docker/wasm32-unknown-emscripten/Dockerfile
new file mode 100644
index 0000000..59bf7d9
--- /dev/null
+++ b/libc/ci/docker/wasm32-unknown-emscripten/Dockerfile
@@ -0,0 +1,21 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ ca-certificates \
+ curl \
+ gcc \
+ git \
+ libc6-dev \
+ python \
+ xz-utils
+
+COPY emscripten.sh /
+RUN bash /emscripten.sh
+
+ENV PATH=$PATH:/rust/bin \
+ CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node-wrapper.sh
+
+COPY emscripten-entry.sh /
+COPY docker/wasm32-unknown-emscripten/node-wrapper.sh /usr/local/bin/node-wrapper.sh
+ENTRYPOINT ["/emscripten-entry.sh"]
diff --git a/libc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh b/libc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
new file mode 100755
index 0000000..b1936f0
--- /dev/null
+++ b/libc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+me=$1
+shift
+dir=$(dirname $me)
+file=$(basename $me)
+
+cd $dir
+exec node $file "$@"