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:
163
163
run : rake ${{ matrix.entry.prerelease }}[${{ inputs.prerel_name }}]
164
164
if : ${{ inputs.prerel_name != '' && matrix.entry.prerelease != '' }}
165
165
- 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 }}
167
167
- name : rake ${{ matrix.entry.test }}
168
168
run : rake ${{ matrix.entry.test }}
169
169
if : ${{ matrix.entry.test != '' }}
Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ FROM emscripten/emsdk:2.0.13
2
2
3
3
RUN set -eux; \
4
4
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; \
6
6
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
7
7
apt-get install nodejs -y; \
8
8
apt-get clean; \
9
9
rm -r /var/lib/apt/lists/*
10
10
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" ]
11
14
# Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
12
15
# This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
13
16
# * 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"
10
10
11
11
RUN set -eux; \
12
12
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; \
14
14
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
15
15
apt-get install nodejs -y; \
16
16
apt-get clean; \
@@ -47,8 +47,10 @@ RUN set -eux pipefail; \
47
47
unzip wasi-preset-args-x86_64-unknown-linux-gnu.zip; \
48
48
mv wasi-preset-args /usr/local/bin/wasi-preset-args
49
49
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" ]
50
53
# Build with non-root user because `@npmcli/promise-spawn` sets `uid` and `gid` to cwd owner when the current user is root.
51
54
# This permission demotion results in EACCES error at reading `$HOME/.node_modules` in `resolve` package, which is used by `@rollup/plugin-node-resolve`.
52
55
# * 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