Docker deployment is failing
kapser
FREEOP

5 months ago

I have created docker image and pushed to docker-hub as I am facing problem connecting to my github account.

I have created docker image and pushed to docker-hub as I am facing problem connecting to my github account.

In my local (macbook), I am able to build the docker and run the docker container.

I have pushed the same docker image to docker-hub and use the docker image in the deployment settings.

It looked like the docker is fetched successfully, but failing to start the container. check the error below!

exec container process `/usr/local/bin/docker-entrypoint.sh`: Exec format error

Please let me know how should I resolve this ?

Solved$10 Bounty

2 Replies

kapser
FREEOP

5 months ago

9fe7287c-3226-4fb3-9c1d-1719b94cb71b


turborx
FREE

5 months ago

hi, your docker deployment is likely failing due to incorrect dockerfile path or build context. make sure your railway.json or RAILWAY_DOCKERFILE_PATH points to the right file, and that all needed files are included in the context. also try simplifying your dockerfile use a lighter base image and install only what's needed. once fixed, redeploy and it should work.


kapser
FREEOP

5 months ago

I don't think it is due to the Dockerfile path as I am using the Docker image. Please check this deployment id: 9a72aede-1ed1-4486-8720-51dcd47f6d2d


jaredlunde
EMPLOYEE

5 months ago

“Exec format error” means the image was built for the wrong architecture. Since you’re using a MacBook, likely arm64 instead of x86. Here’s a guide: https://www.everythingdevops.dev/blog/building-x86-images-on-an-apple-m1-chip


turborx
FREE

5 months ago

yep exec format error usually means the image was built for arm64 but railway expects x86_64. since you're using a mac (probably m1 or m2), try rebuilding your image for x86 using --platform=linux/amd64 for example:

docker buildx build --platform=linux/amd64 -t your-image-name .

then push and redeploy. that should fix the architecture mismatch.


kapser
FREEOP

5 months ago

Thanks so much. I am able to deploy now with amd64 platform architecture. We can close this thread for this query. Thanks again. 👍


jaredlunde
EMPLOYEE

5 months ago

!s


Status changed to Solved jaredlunde 5 months ago


Loading...