Dishit
Dishit6mo ago

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
7 Replies
Dishit
Dishit6mo 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"]
Deno AI Helper
Deno AI Helper6mo 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.
Kyiro
Kyiro6mo 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...
Kyiro
Kyiro6mo ago
Though dockerhub doesn't seem to have it yet
bartlomieju
bartlomieju6mo ago
Should be available tomorrow
Dishit
Dishit6mo ago
Ah i see, thank you