How to get the Docker ARM image for Deno

I keep getting this error when trying to deploy my code:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /tini: exec format error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /tini: exec format error
D
Dishit69d ago
My docker file
# Use the official Deno image from the Docker Hub
FROM denoland/deno:1.40.4

# Set the working directory
WORKDIR /app

# Copy the project files to the Docker image
COPY . .

# Expose port 3000 to the outside
EXPOSE 3000

# Run the server when the Docker image is run, replace 'server.js' with your server file
CMD ["deno", "run", "--allow-all", "main.ts"]
# Use the official Deno image from the Docker Hub
FROM denoland/deno:1.40.4

# Set the working directory
WORKDIR /app

# Copy the project files to the Docker image
COPY . .

# Expose port 3000 to the outside
EXPOSE 3000

# Run the server when the Docker image is run, replace 'server.js' with your server file
CMD ["deno", "run", "--allow-all", "main.ts"]
DAH
Deno AI Helper69d ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like you're trying to run an AMD64 Docker image on an ARM64 architecture, which is causing the incompatibility issue. To resolve this, you should ensure that you're pulling the correct Docker image that is built for ARM64. If Deno provides an official ARM64 Docker image, you should use that. When pulling the image from Docker Hub or another registry, you can specify the platform using the --platform flag, like so:
docker pull --platform=linux/arm64/v8 denoland/deno:latest
docker pull --platform=linux/arm64/v8 denoland/deno:latest
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice and consult the Docker documentation or Deno's official resources for more information on obtaining the correct ARM image for Deno.
K
Kyiro68d ago
Deno only got an official arm64 distribution really recently so it's possible the docker image wasn't updated yet https://github.com/denoland/deno/pull/22298
GitHub
feat: ARM64 builds by mmastrac · Pull Request #22298 · denoland/deno
This implements officially blessed and tested deno binaries for ARM64. Thanks to @LukeChannings for his tireless work in maintaining the deno-arm64 [1] repo, without which this project would have b...
K
Kyiro68d ago
Though dockerhub doesn't seem to have it yet
B
bartlomieju68d ago
Should be available tomorrow
D
Dishit68d ago
Ah i see, thank you
More Posts
Deno compiled bin not create fileHi, I have a script that create file with Deno.writeFileSync() on current location When run script VSCode Extension Failing ot Initialize:party_deno: **RESOLVED** :party_deno: Having a bit of trouble using the VSCode Extension. `deno`deno command stdin, stdout continous readingI am trying to spawn an AI (cpp code) however after launching the code it immediately exits. It alsoProblem rerender a island when updating the value of a signal!Hi there im trying to make a visual change to the selected category button. However it does not rereCannot find namespace NodeJSHi Context: using deno with npm lib (imap). There seems to be a missing/unresolved to NodeJS that Which components exactly should be islands?Hi! I am currently developing a web app using fresh and I am getting confused about the usage of islError using npm:ssh2-sftp-client@10.0.3I am trying to connect to a sftp server using the library mentioned in the title (that is a wrapper How to restrict global scope in dynamically created function?I want to dynamically create a function using Function() constructor. How can I restrict access to gTyping for Dynamic importsSo I have a function like this that uses a dynamic import like ```ts export async function func1(imError with fetch called from npm moduleI am trying to use the `tsdav` NPM package with Deno, and have run into a problem with making an HTTCompile to exeEvery time I run my exe I get the following error, But when I start my code normally with node main.What does this library "assert" does?Hi https://deno.land/std@0.215.0/assert/mod.ts What does it do in this example? https://docs.deno.coWhat does this library "assert" does?https://deno.land/std@0.215.0/assert/mod.ts What does it do in this example? https://docs.deno.com/rLooking for an alternative to deno_domHi I'm looking for an alternative library to https://deno.land/x/deno_dom@v0.1.45/deno-dom-wasm.ts PCompile to exeEvery time I run my exe I get the following error: But when I start my code normally with node maiRunning untrusted code, eval-styleI have a project that on occassion I want to be able to execute JS code that I can then quickly get