<h2 dir="auto">Problem summery</h2>
<p dir="auto">I cannot install deno in a docker container. Here is what I've tried:</p>
<h3 dir="auto">install script</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -fsSL https://deno.land/x/install/install.sh | sh
Deno was installed successfully to /root/.deno/bin/deno

$ deno
zsh: exec format error: deno"><pre class="notranslate"><code class="notranslate">$ curl -fsSL https://deno.land/x/install/install.sh | sh
Deno was installed successfully to /root/.deno/bin/deno

$ deno
zsh: exec format error: deno
</code></pre></div>
<h3 dir="auto">cargo install</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cargo --version
cargo 1.58.0 (7f08ace4f 2021-11-24)

$ cargo install deno --locked
...
error: failed to compile `deno v1.17.3`, intermediate artifacts can be found at `/tmp/cargo-install03hoSN`

Caused by:
  could not compile `deno`

Caused by:
  process didn't exit successfully: `rustc --crate-name deno --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.17.3/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=1f1c0990b85e63cd -C extra-filename=-1f1c0990b85e63cd --out-dir /tmp/cargo-install03hoSN/release/deps -L dependency=/tmp/cargo-install03hoSN/release/deps --extern atty=/tmp/cargo-install03hoSN/release/deps/libatty-4ca99d75fc4afeac.rlib --extern base64=/tmp/cargo-install03hoSN/release/deps/libbase64-d28f00246089566e.rlib --extern cache_control=/tmp/cargo-install03hoSN/release/deps/libcache_control-5c083f7e46a3a267.rlib --extern chrono=/tmp/cargo-install03hoSN/release/deps/libchrono-d7c1e1b14e054cb5.rlib --extern clap=/tmp/cargo-install03hoSN/release/deps/libclap-ee1e636161eec735.rlib --extern data_url=/tmp/cargo-install03hoSN/release/deps/libdata_url-ffd1e3b6c59321c3.rlib --extern deno_ast=/tmp/cargo-install03hoSN/release/deps/libdeno_ast-e78d45bf92a6010c.rlib --extern deno_core=/tmp/cargo-install03hoSN/release/deps/libdeno_core-d3d6c286afc0159f.rlib --extern deno_doc=/tmp/cargo-install03hoSN/release/deps/libdeno_doc-60198b2d52405ce2.rlib --extern deno_graph=/tmp/cargo-install03hoSN/release/deps/libdeno_graph-4db7a5e99d0f5d9d.rlib --extern deno_lint=/tmp/cargo-install03hoSN/release/deps/libdeno_lint-0acc40d0782ff7b8.rlib --extern deno_runtime=/tmp/cargo-install03hoSN/release/deps/libdeno_runtime-e8b49a87f7f0fa28.rlib --extern dissimilar=/tmp/cargo-install03hoSN/release/deps/libdissimilar-e63dd43ec4866c59.rlib --extern dprint_plugin_json=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_json-e2d714280fad4f6c.rlib --extern dprint_plugin_markdown=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_markdown-a1f87a9a7a7ecd89.rlib --extern dprint_plugin_typescript=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_typescript-a6879a335c708e5f.rlib --extern encoding_rs=/tmp/cargo-install03hoSN/release/deps/libencoding_rs-2417e5640c704bcb.rlib --extern env_logger=/tmp/cargo-install03hoSN/release/deps/libenv_logger-da753f5c37b1b392.rlib --extern fancy_regex=/tmp/cargo-install03hoSN/release/deps/libfancy_regex-14dd253db9d191e3.rlib --extern http=/tmp/cargo-install03hoSN/release/deps/libhttp-261d3f1761718ac6.rlib --extern import_map=/tmp/cargo-install03hoSN/release/deps/libimport_map-4a5386a1e3b6770b.rlib --extern jsonc_parser=/tmp/cargo-install03hoSN/release/deps/libjsonc_parser-41580e29a8b7d38b.rlib --extern libc=/tmp/cargo-install03hoSN/release/deps/liblibc-91d06b1bde96cecd.rlib --extern log=/tmp/cargo-install03hoSN/release/deps/liblog-bafb27118f6409cf.rlib --extern lspower=/tmp/cargo-install03hoSN/release/deps/liblspower-de9f6a790a1ca491.rlib --extern notify=/tmp/cargo-install03hoSN/release/deps/libnotify-af73e75fddd9deb7.rlib --extern num_cpus=/tmp/cargo-install03hoSN/release/deps/libnum_cpus-920ee78dfd09d8ec.rlib --extern once_cell=/tmp/cargo-install03hoSN/release/deps/libonce_cell-b05ef1fb694171f8.rlib --extern percent_encoding=/tmp/cargo-install03hoSN/release/deps/libpercent_encoding-3963a5f7b0bc64ba.rlib --extern pin_project=/tmp/cargo-install03hoSN/release/deps/libpin_project-328f24a44d4d3da3.rlib --extern rand=/tmp/cargo-install03hoSN/release/deps/librand-b4c52f196298cd52.rlib --extern regex=/tmp/cargo-install03hoSN/release/deps/libregex-3fd935d06ccdb69b.rlib --extern ring=/tmp/cargo-install03hoSN/release/deps/libring-39b3a0e1b24dc8c4.rlib --extern rustyline=/tmp/cargo-install03hoSN/release/deps/librustyline-4f64ab9daf82002e.rlib --extern rustyline_derive=/tmp/cargo-install03hoSN/release/deps/librustyline_derive-da5d770779d15e90.so --extern semver_parser=/tmp/cargo-install03hoSN/release/deps/libsemver_parser-4bf4dd4b8f720e1c.rlib --extern serde=/tmp/cargo-install03hoSN/release/deps/libserde-a4afd6832cbb73de.rlib --extern shell_escape=/tmp/cargo-install03hoSN/release/deps/libshell_escape-a7268498298d47d9.rlib --extern sourcemap=/tmp/cargo-install03hoSN/release/deps/libsourcemap-3620a1cfdeeb5de2.rlib --extern tempfile=/tmp/cargo-install03hoSN/release/deps/libtempfile-e17a77263d6f4a0a.rlib --extern text_size=/tmp/cargo-install03hoSN/release/deps/libtext_size-82d43970e9c9065a.rlib --extern text_lines=/tmp/cargo-install03hoSN/release/deps/libtext_lines-363e440556091276.rlib --extern tokio=/tmp/cargo-install03hoSN/release/deps/libtokio-3e0a45ac81bdfe4f.rlib --extern typed_arena=/tmp/cargo-install03hoSN/release/deps/libtyped_arena-7facb343436693cd.rlib --extern uuid=/tmp/cargo-install03hoSN/release/deps/libuuid-eed30c67f4c9eb8d.rlib --extern walkdir=/tmp/cargo-install03hoSN/release/deps/libwalkdir-f62f207390a87e39.rlib --cap-lints allow -L /tmp/cargo-install03hoSN/release/gn_out/obj -L native=/tmp/cargo-install03hoSN/release/build/ring-fb737f9aa437b798/out -L /tmp/cargo-install03hoSN/release/build/libffi-sys-71ef03a069068459/out/libffi-root/lib -L /tmp/cargo-install03hoSN/release/build/libffi-sys-71ef03a069068459/out/libffi-root/lib64 -L native=/tmp/cargo-install03hoSN/release/build/libsqlite3-sys-60762d2c6263e170/out -L native=/tmp/cargo-install03hoSN/release/build/sys-info-5764e84cf674759b/out` (signal: 9, SIGKILL: kill)"><pre class="notranslate"><code class="notranslate">$ cargo --version
cargo 1.58.0 (7f08ace4f 2021-11-24)

$ cargo install deno --locked
...
error: failed to compile `deno v1.17.3`, intermediate artifacts can be found at `/tmp/cargo-install03hoSN`

Caused by:
  could not compile `deno`

Caused by:
  process didn't exit successfully: `rustc --crate-name deno --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.17.3/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=1f1c0990b85e63cd -C extra-filename=-1f1c0990b85e63cd --out-dir /tmp/cargo-install03hoSN/release/deps -L dependency=/tmp/cargo-install03hoSN/release/deps --extern atty=/tmp/cargo-install03hoSN/release/deps/libatty-4ca99d75fc4afeac.rlib --extern base64=/tmp/cargo-install03hoSN/release/deps/libbase64-d28f00246089566e.rlib --extern cache_control=/tmp/cargo-install03hoSN/release/deps/libcache_control-5c083f7e46a3a267.rlib --extern chrono=/tmp/cargo-install03hoSN/release/deps/libchrono-d7c1e1b14e054cb5.rlib --extern clap=/tmp/cargo-install03hoSN/release/deps/libclap-ee1e636161eec735.rlib --extern data_url=/tmp/cargo-install03hoSN/release/deps/libdata_url-ffd1e3b6c59321c3.rlib --extern deno_ast=/tmp/cargo-install03hoSN/release/deps/libdeno_ast-e78d45bf92a6010c.rlib --extern deno_core=/tmp/cargo-install03hoSN/release/deps/libdeno_core-d3d6c286afc0159f.rlib --extern deno_doc=/tmp/cargo-install03hoSN/release/deps/libdeno_doc-60198b2d52405ce2.rlib --extern deno_graph=/tmp/cargo-install03hoSN/release/deps/libdeno_graph-4db7a5e99d0f5d9d.rlib --extern deno_lint=/tmp/cargo-install03hoSN/release/deps/libdeno_lint-0acc40d0782ff7b8.rlib --extern deno_runtime=/tmp/cargo-install03hoSN/release/deps/libdeno_runtime-e8b49a87f7f0fa28.rlib --extern dissimilar=/tmp/cargo-install03hoSN/release/deps/libdissimilar-e63dd43ec4866c59.rlib --extern dprint_plugin_json=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_json-e2d714280fad4f6c.rlib --extern dprint_plugin_markdown=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_markdown-a1f87a9a7a7ecd89.rlib --extern dprint_plugin_typescript=/tmp/cargo-install03hoSN/release/deps/libdprint_plugin_typescript-a6879a335c708e5f.rlib --extern encoding_rs=/tmp/cargo-install03hoSN/release/deps/libencoding_rs-2417e5640c704bcb.rlib --extern env_logger=/tmp/cargo-install03hoSN/release/deps/libenv_logger-da753f5c37b1b392.rlib --extern fancy_regex=/tmp/cargo-install03hoSN/release/deps/libfancy_regex-14dd253db9d191e3.rlib --extern http=/tmp/cargo-install03hoSN/release/deps/libhttp-261d3f1761718ac6.rlib --extern import_map=/tmp/cargo-install03hoSN/release/deps/libimport_map-4a5386a1e3b6770b.rlib --extern jsonc_parser=/tmp/cargo-install03hoSN/release/deps/libjsonc_parser-41580e29a8b7d38b.rlib --extern libc=/tmp/cargo-install03hoSN/release/deps/liblibc-91d06b1bde96cecd.rlib --extern log=/tmp/cargo-install03hoSN/release/deps/liblog-bafb27118f6409cf.rlib --extern lspower=/tmp/cargo-install03hoSN/release/deps/liblspower-de9f6a790a1ca491.rlib --extern notify=/tmp/cargo-install03hoSN/release/deps/libnotify-af73e75fddd9deb7.rlib --extern num_cpus=/tmp/cargo-install03hoSN/release/deps/libnum_cpus-920ee78dfd09d8ec.rlib --extern once_cell=/tmp/cargo-install03hoSN/release/deps/libonce_cell-b05ef1fb694171f8.rlib --extern percent_encoding=/tmp/cargo-install03hoSN/release/deps/libpercent_encoding-3963a5f7b0bc64ba.rlib --extern pin_project=/tmp/cargo-install03hoSN/release/deps/libpin_project-328f24a44d4d3da3.rlib --extern rand=/tmp/cargo-install03hoSN/release/deps/librand-b4c52f196298cd52.rlib --extern regex=/tmp/cargo-install03hoSN/release/deps/libregex-3fd935d06ccdb69b.rlib --extern ring=/tmp/cargo-install03hoSN/release/deps/libring-39b3a0e1b24dc8c4.rlib --extern rustyline=/tmp/cargo-install03hoSN/release/deps/librustyline-4f64ab9daf82002e.rlib --extern rustyline_derive=/tmp/cargo-install03hoSN/release/deps/librustyline_derive-da5d770779d15e90.so --extern semver_parser=/tmp/cargo-install03hoSN/release/deps/libsemver_parser-4bf4dd4b8f720e1c.rlib --extern serde=/tmp/cargo-install03hoSN/release/deps/libserde-a4afd6832cbb73de.rlib --extern shell_escape=/tmp/cargo-install03hoSN/release/deps/libshell_escape-a7268498298d47d9.rlib --extern sourcemap=/tmp/cargo-install03hoSN/release/deps/libsourcemap-3620a1cfdeeb5de2.rlib --extern tempfile=/tmp/cargo-install03hoSN/release/deps/libtempfile-e17a77263d6f4a0a.rlib --extern text_size=/tmp/cargo-install03hoSN/release/deps/libtext_size-82d43970e9c9065a.rlib --extern text_lines=/tmp/cargo-install03hoSN/release/deps/libtext_lines-363e440556091276.rlib --extern tokio=/tmp/cargo-install03hoSN/release/deps/libtokio-3e0a45ac81bdfe4f.rlib --extern typed_arena=/tmp/cargo-install03hoSN/release/deps/libtyped_arena-7facb343436693cd.rlib --extern uuid=/tmp/cargo-install03hoSN/release/deps/libuuid-eed30c67f4c9eb8d.rlib --extern walkdir=/tmp/cargo-install03hoSN/release/deps/libwalkdir-f62f207390a87e39.rlib --cap-lints allow -L /tmp/cargo-install03hoSN/release/gn_out/obj -L native=/tmp/cargo-install03hoSN/release/build/ring-fb737f9aa437b798/out -L /tmp/cargo-install03hoSN/release/build/libffi-sys-71ef03a069068459/out/libffi-root/lib -L /tmp/cargo-install03hoSN/release/build/libffi-sys-71ef03a069068459/out/libffi-root/lib64 -L native=/tmp/cargo-install03hoSN/release/build/libsqlite3-sys-60762d2c6263e170/out -L native=/tmp/cargo-install03hoSN/release/build/sys-info-5764e84cf674759b/out` (signal: 9, SIGKILL: kill)
</code></pre></div>
<h3 dir="auto">(copy the binary installed in host)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ deno
zsh: exec format error: deno"><pre class="notranslate"><code class="notranslate">$ deno
zsh: exec format error: deno
</code></pre></div>
<h2 dir="auto">Environment</h2>
<h3 dir="auto">Host</h3>
<ul dir="auto">
<li>macOS 12.1</li>
<li>Apple M1 Chip</li>
<li>docker 20.10</li>
</ul>
<h3 dir="auto">Container</h3>
<ul dir="auto">
<li>Ubuntu 20.04</li>
<li>aarch64</li>
</ul>
<p dir="auto">Builds for arm64 are now in CI, but are not ready for release. We still need to make some changes to make the tests work with this build.<br>
<strike>I managed to get deno to build for arm64 using the <code class="notranslate">aarch64-unknown-linux-gnu</code> target. Currently It doesn't execute successfully on a raspberry pi 3b+ running <a href="https://wiki.debian.org/RaspberryPi3" rel="nofollow">a preview image of debian buster arm64/aarch64</a>. It gives me the following print out:</strike></p><strike>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@rpi3:~/deno-build# ./deno https://deno.land/welcome.ts
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xfffff58d4d10
==== C stack trace ===============================

    ./deno(+0x8ad5fc) [0xaaaaafc445fc]
    ./deno(+0x9dd72c) [0xaaaaafd7472c]
    ./deno(+0x8a9f10) [0xaaaaafc40f10]
    ./deno(+0x83aa08) [0xaaaaafbd1a08]
    ./deno(+0x69c070) [0xaaaaafa33070]
    ./deno(+0x7bdbb4) [0xaaaaafb54bb4]
    ./deno(+0x7bdb00) [0xaaaaafb54b00]
    ./deno(+0x7bc6bc) [0xaaaaafb536bc]
    ./deno(+0x7bd9f8) [0xaaaaafb549f8]
    ./deno(+0x7bbbb8) [0xaaaaafb52bb8]
    ./deno(+0x2165dc) [0xaaaaaf5ad5dc]
    ./deno(+0x7c0be4) [0xaaaaafb57be4]
    ./deno(+0x663f68) [0xaaaaaf9faf68]
    ./deno(+0x7c0124) [0xaaaaafb57124]
    ./deno(+0x1c8e80) [0xaaaaaf55fe80]
    ./deno(+0x1c8f68) [0xaaaaaf55ff68]
    ./deno(+0x1b3dec) [0xaaaaaf54adec]
    ./deno(+0xce2f0) [0xaaaaaf4652f0]
    ./deno(+0x112b78) [0xaaaaaf4a9b78]
    ./deno(+0x11ef74) [0xaaaaaf4b5f74]
    ./deno(+0xb80c38) [0xaaaaaff17c38]
    ./deno(+0xb8fcf4) [0xaaaaaff26cf4]
    ./deno(+0xb814ec) [0xaaaaaff184ec]
    ./deno(+0x112d50) [0xaaaaaf4a9d50]
    /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe4) [0xffff8644ed24]
    ./deno(+0xbae4c) [0xaaaaaf451e4c]
"><pre class="notranslate"><code class="notranslate">root@rpi3:~/deno-build# ./deno https://deno.land/welcome.ts
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xfffff58d4d10
==== C stack trace ===============================

    ./deno(+0x8ad5fc) [0xaaaaafc445fc]
    ./deno(+0x9dd72c) [0xaaaaafd7472c]
    ./deno(+0x8a9f10) [0xaaaaafc40f10]
    ./deno(+0x83aa08) [0xaaaaafbd1a08]
    ./deno(+0x69c070) [0xaaaaafa33070]
    ./deno(+0x7bdbb4) [0xaaaaafb54bb4]
    ./deno(+0x7bdb00) [0xaaaaafb54b00]
    ./deno(+0x7bc6bc) [0xaaaaafb536bc]
    ./deno(+0x7bd9f8) [0xaaaaafb549f8]
    ./deno(+0x7bbbb8) [0xaaaaafb52bb8]
    ./deno(+0x2165dc) [0xaaaaaf5ad5dc]
    ./deno(+0x7c0be4) [0xaaaaafb57be4]
    ./deno(+0x663f68) [0xaaaaaf9faf68]
    ./deno(+0x7c0124) [0xaaaaafb57124]
    ./deno(+0x1c8e80) [0xaaaaaf55fe80]
    ./deno(+0x1c8f68) [0xaaaaaf55ff68]
    ./deno(+0x1b3dec) [0xaaaaaf54adec]
    ./deno(+0xce2f0) [0xaaaaaf4652f0]
    ./deno(+0x112b78) [0xaaaaaf4a9b78]
    ./deno(+0x11ef74) [0xaaaaaf4b5f74]
    ./deno(+0xb80c38) [0xaaaaaff17c38]
    ./deno(+0xb8fcf4) [0xaaaaaff26cf4]
    ./deno(+0xb814ec) [0xaaaaaff184ec]
    ./deno(+0x112d50) [0xaaaaaf4a9d50]
    /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe4) [0xffff8644ed24]
    ./deno(+0xbae4c) [0xaaaaaf451e4c]

</code></pre></div>
</strike><p dir="auto"><strike>I opened up the executable with a <a href="https://github.com/radareorg/cutter">arm compatible disassembler</a>, and located the last call from within deno before failure, <code class="notranslate">0x1b3dec</code>. It looks like this call occurs here </strike></p><div class="Box Box--condensed my-2"><strike>
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/denoland/deno/blob/b8a537d020f5e4495572daa4d8a59f51fa3b20d1/libdeno/api.cc#L54">deno/libdeno/api.cc</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 54
      in
      <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/b8a537d020f5e4495572daa4d8a59f51fa3b20d1">b8a537d</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L54" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="54"></td>
          <td id="LC54" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> v8::Isolate* isolate = <span class="pl-c1">v8::Isolate::New</span>(params); </td>
        </tr>
    </tbody></table>
  </div>
</strike></div><strike>
 This leads me to suspect an issue with loading the snapshot.</strike><p></p>
<strike>
I managed to get this working successfully with the changes in [my forked branch](https://github.com/afinch7/deno/tree/arm-builds).
<p dir="auto">To replicate my arm64 build you will need docker installed.<br>
Then it should be as simple as:</p>
<ol dir="auto">
<li>Add the following options to .gn</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="target_cpu = &quot;arm64&quot;
v8_target_cpu = &quot;arm64&quot;"><pre class="notranslate"><code class="notranslate">target_cpu = "arm64"
v8_target_cpu = "arm64"
</code></pre></div>
<ol start="2" dir="auto">
<li>Add the following to <code class="notranslate">Dockerfile</code> in your deno repo root</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM ubuntu:bionic

RUN apt update &amp;&amp; apt install -y curl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu

RUN echo &quot;[target.aarch64-unknown-linux-gnu]\nlinker = \&quot;aarch64-linux-gnu-gcc\&quot;&quot; &gt; /root/.cargo/config

RUN apt install -y nodejs yarn python build-essential cmake make

RUN apt -yq --no-install-suggests --no-install-recommends install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-7-multilib libc6-arm64-cross

WORKDIR /deno

RUN echo &quot;source $HOME/.cargo/env&quot; &gt; /root/.bash

CMD [&quot;/bin/bash&quot;, &quot;--init-file&quot;, &quot;/root/.bash&quot;]"><pre class="notranslate"><code class="notranslate">FROM ubuntu:bionic

RUN apt update &amp;&amp; apt install -y curl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu

RUN echo "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" &gt; /root/.cargo/config

RUN apt install -y nodejs yarn python build-essential cmake make

RUN apt -yq --no-install-suggests --no-install-recommends install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-7-multilib libc6-arm64-cross

WORKDIR /deno

RUN echo "source $HOME/.cargo/env" &gt; /root/.bash

CMD ["/bin/bash", "--init-file", "/root/.bash"]
</code></pre></div>
<ol start="3" dir="auto">
<li>Run <code class="notranslate">docker build -f Dockerfile -t deno-arm64-build . &amp;&amp; docker run -it -v "$PWD/:/deno" -u $(id -u root):$(id -g ${USER}) deno-arm64-build</code> in your deno repo root. This should build a docker image with the required tools and drop you into a bash shell on said image with your deno repo mounted at <code class="notranslate">/deno</code>.</li>
<li>From this point you simply need to run <code class="notranslate">cargo build --target=aarch64-unknown-linux-gnu --release</code></li>
<li>Once the build completes the executable should be located at <code class="notranslate">target/aarch64-unknown-linux-gnu/release/deno</code></li>
</ol>
</strike><p dir="auto"><strike>I wasn't able to get a build working with <code class="notranslate">tools/build.py</code>, since I couldn't find a way to specify a target for  rust <del>it might be possible to use env vars like CC, AR, CFLAGS, etc. I might try that at some point, but I'm putting my efforts into figuring out if the snapshots are even being included in the build correctly right now.</del></strike><strike><br>
I not sure what changed, but I can't get the build to work anymore with docker. I can still get this to work outside of docker though. I'm working on getting this into CI see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="417467957" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1887" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/1887/hovercard" href="https://github.com/denoland/deno/pull/1887">#1887</a>. The main problem with getting this into CI is how long it takes to build.</strike></p>
<p dir="auto">Edit: fixed some issues with the <code class="notranslate">Dockerfile</code><br>
Edit: added the current user group to the docker run command so this doesn't break your repo as much<br>
Edit: my forked branch has modifications to make this work now</p>