File tree Expand file tree Collapse file tree 5 files changed +25
-7
lines changed
wasm32-unknown-emscripten Expand file tree Collapse file tree 5 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ jobs:
163163 run : rake ${{ matrix.entry.prerelease }}[${{ inputs.prerel_name }}]
164164 if : ${{ inputs.prerel_name != '' && matrix.entry.prerelease != '' }}
165165 - name : rake ${{ matrix.entry.task }}
166- run : docker run -v "$GITHUB_WORKSPACE:/home/me/build" -w /home/me/build -e "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" sha256:$BUILDER_IMAGE_ID rake ${{ matrix.entry.task }}
166+ run : docker run -v "$GITHUB_WORKSPACE:/home/me/build" -w /home/me/build -e "RUBYWASM_UID=$(id -u)" -e "RUBYWASM_GID=$(id -g)" -e " GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" sha256:$BUILDER_IMAGE_ID rake ${{ matrix.entry.task }}
167167 - name : rake ${{ matrix.entry.test }}
168168 run : rake ${{ matrix.entry.test }}
169169 if : ${{ matrix.entry.test != '' }}
Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ FROM emscripten/emsdk:2.0.13
22
33RUN set -eux; \
44 apt-get update; \
5- apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev -y; \
5+ apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev gosu -y; \
66 curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
77 apt-get install nodejs -y; \
88 apt-get clean; \
99 rm -r /var/lib/apt/lists/*
1010
11+ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
12+ RUN chmod +x /usr/local/bin/entrypoint.sh
13+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
1114# Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
1215# This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
1316# * https://github.com/npm/cli/blob/32336f6efe06bd52de1dc67c0f812d4705533ef2/node_modules/%40npmcli/promise-spawn/lib/index.js#L13
14- RUN groupadd -r me && useradd -g me me && mkdir -p /home/me && chown me:me /home/me
15- USER me
17+ RUN adduser --disabled-password --gecos '' me
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ [ ! -z " ${RUBYWASM_UID+x} " ] && usermod --uid " $RUBYWASM_UID " --non-unique me
6+ [ ! -z " ${RUBYWASM_GID+x} " ] && groupmod --gid " $RUBYWASM_GID " me
7+ exec gosu me " $@ "
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ENV WASI_SDK_PATH="/opt/wasi-sdk"
1010
1111RUN set -eux; \
1212 apt-get update; \
13- apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev -y; \
13+ apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev gosu -y; \
1414 curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
1515 apt-get install nodejs -y; \
1616 apt-get clean; \
@@ -47,8 +47,10 @@ RUN set -eux pipefail; \
4747 unzip wasi-preset-args-x86_64-unknown-linux-gnu.zip; \
4848 mv wasi-preset-args /usr/local/bin/wasi-preset-args
4949
50+ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
51+ RUN chmod +x /usr/local/bin/entrypoint.sh
52+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
5053# Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
5154# This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
5255# * https://github.com/npm/cli/blob/32336f6efe06bd52de1dc67c0f812d4705533ef2/node_modules/%40npmcli/promise-spawn/lib/index.js#L13
53- RUN groupadd -r me && useradd -g me me && mkdir -p /home/me && chown me:me /home/me
54- USER me
56+ RUN adduser --disabled-password --gecos '' me
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ [ ! -z " ${RUBYWASM_UID+x} " ] && usermod --uid " $RUBYWASM_UID " --non-unique me
6+ [ ! -z " ${RUBYWASM_GID+x} " ] && groupmod --gid " $RUBYWASM_GID " me
7+ exec gosu me " $@ "
You can’t perform that action at this time.
0 commit comments