8

Was using Azure Container Apps and on deploy the command failed to provision the container and told me to check log analytics. When I checked I only see a single log from the container that says:

standard_init_linux.go:228: exec user process caused: exec format error

What's the issue here?

jeffhollan
  • 3,139
  • 15
  • 18

1 Answers1

19

This error can happen when the arch of the docker image doesn't match the runtime environment. Azure Container Apps runs on amd64 arch, and I built and published these docker containers from a Mac M1 ARM processor. I had two options here:

  1. Use features like docker buildx build --platform linux/amd64 to emulator an amd64 and publish a version there
  2. Use some remote build (like GitHub Actions) to build the container on an arch that matches Azure Container Apps environment
jeffhollan
  • 3,139
  • 15
  • 18
  • 1
    Alternatively, adding `platform: linux/amd64` to your docker-compose.yml should do the trick with the least amount of effort, as seen here: https://stackoverflow.com/questions/69708866/how-to-make-docker-compose-work-on-m1-chip – Eiron Feb 17 '23 at 08:25