Gitea standard_init_linux.go:211: exec user process caused "exec format error"

I’m seeing the above error when I try to run gitea:latest from docker on an amd64 installation.

My docker-compose.yml is here:

version: "2"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:latest
    environment:
      - USER_UID=1000
      - USER_GID=1000
        #    restart: always
    networks:
      - gitea
    volumes:
      - /media/nfs/docker/gitea:/data                                                                                                                                           
    ports:
      - "10080:3000"
      - "10022:22"

When I run docker-compose up -d it fails and docker logs shows the error in the subject.

I just tried your docker-compose.yml. It works like a charm for me.
Is your system up-to-date? Have you tried any other versions, like 1.9.3?

Hmm. Everything is all up to date. The container/image (I’m not great with docker) was created a while ago before they switched over to docker compose.
Removing the image from docker and doing a prune then recreating it seems to have fixed the issue.

I think you still had an old and problematic image. The problem with latest images is, that you have to make a pull every time you want a newer image. If you use tagged images, you can just change to a newer one and as soon as you run docker-compose up -d, it pulls the new image.

Try using the tag :linux-amd64, works for me for now.

Thanks cim.
That seems to have done the trick.

1 Like