Next.js Discord

Discord Forum

Docker image - no manifest matching linux/arm64/v8 error

Unanswered
Canaan Dog posted this in #help-forum
Open in Discord
Canaan DogOP
Hi all,
following directions here: https://nextjs.org/docs/pages/building-your-application/deploying#docker-image
in additional one extra line to install python RUN apk add --update --no-cache python3 build-base gcc && ln -sf /usr/bin/python3 /usr/bin/python, everything else is the same.

I've tagged and pushed the image to Docker hub but when I try Docker Pull, I get an error no matching manifest for linux/arm64/v8 in the manifest list entries

Would someone kindly point me in the right direction?
Thanks in advance

13 Replies

European sprat
try adding --platform linux/x86_64/v8 to the pull
Canaan DogOP
oh hey that worked, thank you so much!
Is there a "better" way to include the platform specification in either github actions or dockerfile?
European sprat
well you have this issue because you're on an M1/2 mac which is arm64 but the docker image you created is x86_64
and if you want to run a container with the image on your mac you'll probably also need to add that platform flag which emulates x86_64
in case, you can set the platform in a dockerfile
https://docs.docker.com/engine/reference/builder/#from
European sprat
if you're deploying the image to aws or similar then it's always going to be x86_64 unless you specifically have an ARM server
but as Jarrah said, stay close to your target platform.
Canaan DogOP
European sprat
but like that dockerfile link above shows, you could make the dockerfile --platform ARM (but probably best to keep it as-is and use the platform flag when you pull/run it)
i have the same need as you, i have a command to run it on my mac and let my docketfile as it is
@European sprat try adding --platform linux/x86_64/v8 to the pull
Nile Crocodile
Thank you so much!!! This helped me, too! 🙂 ❤️
Golden-winged Warbler
You can use docker buildx to build images that are multi-arch, but will require emulation locally to build, like with QEMU. If you build in GHA, the docker actions have options to set all this up