Skip to content

Commit

Permalink
fix: install Deno manually (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Dec 4, 2024
1 parent f7cc3b2 commit 2318346
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions 7.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
*) echo "unsupported NodeJS architecture"; exit 1 ;; \
esac \
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
&& export GNUPGHOME="$(mktemp -d)" \
Expand Down Expand Up @@ -57,8 +57,31 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
| xargs -r apt-mark manual \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

# Deno installation based on https://github.com/denoland/deno_docker?tab=readme-ov-file#using-your-own-base-image
COPY --from=denoland/deno:bin-1.37.1 /deno /usr/local/bin/deno
ENV DENO_VERSION=1.37.1

RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x86_64';; \
arm64) ARCH='aarch64';; \
*) echo "unsupported Deno architecture"; exit 1 ;; \
esac \
&& set -ex \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip \
--output /tmp/deno.zip \
&& unzip /tmp/deno.zip -d /tmp \
&& rm /tmp/deno.zip \
&& chmod 755 /tmp/deno \
&& mv /tmp/deno /usr/local/bin/deno \
&& apt-mark auto '.*' > /dev/null \
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { print $(NF-1) }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -r apt-mark manual \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

RUN groupadd -r rocketchat \
&& useradd -r -g rocketchat rocketchat \
Expand Down

0 comments on commit 2318346

Please sign in to comment.