Why does my Docker container work on my machine but crash with 'exec format error' on the server?

0votes

I build a Docker image on an Apple Silicon MacBook (M2) with docker build -t myapp . and push it to Docker Hub. The production server is a standard x86_64 Linux VPS that pulls and runs the same image.

The container should start on the server exactly as it does locally.

On the server, docker run exits immediately with exec /usr/local/bin/node: exec format error in the logs.

Question comments

Short clarifications and follow-ups about the question itself.

No comments yet.

0 Answers

No answers yet

There are no published answers to show.

Your answer

Sign in to share a solution.