Skip to content

Commit 737b75c

Browse files
committed
update node20 template to include Deno
1 parent 2318346 commit 737b75c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

templates/node20/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,32 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
5959
| xargs -r apt-mark manual \
6060
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
6161

62+
ENV DENO_VERSION=1.37.1
63+
64+
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
65+
&& case "${dpkgArch##*-}" in \
66+
amd64) ARCH='x86_64';; \
67+
arm64) ARCH='aarch64';; \
68+
*) echo "unsupported Deno architecture"; exit 1 ;; \
69+
esac \
70+
&& set -ex \
71+
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \
72+
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip \
73+
--output /tmp/deno.zip \
74+
&& unzip /tmp/deno.zip -d /tmp \
75+
&& rm /tmp/deno.zip \
76+
&& chmod 755 /tmp/deno \
77+
&& mv /tmp/deno /usr/local/bin/deno \
78+
&& apt-mark auto '.*' > /dev/null \
79+
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
80+
| awk '/=>/ { print $(NF-1) }' \
81+
| sort -u \
82+
| xargs -r dpkg-query --search \
83+
| cut -d: -f1 \
84+
| sort -u \
85+
| xargs -r apt-mark manual \
86+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
87+
6288
RUN groupadd -r rocketchat \
6389
&& useradd -r -g rocketchat rocketchat \
6490
&& mkdir -p /app/uploads \

0 commit comments

Comments
 (0)