0

I cloned my working project. Then I did a docker-compose build which was successful. Now I do docker-compose up and three containers exit with an error

nginx_1        | exec /usr/local/bin/entrypoint: exec format error
crm-php-fpm_1  | exec /usr/local/bin/tini_entrypoint: exec format error
clickhouse_1   | exec /entrypoint.sh: exec format error

Perhaps the problem is that I'm running on M1 processes, as I read, rebuilding the container can help, but I have little experience with docker, so I ask for your help.

If necessary, I can add the contents of the necessary files.

Below is the dockerfile of one of the erroneous containers. (nginx_1)

FROM registry.is74.ru/docker/nginx:1.20.1-alpine-r1
COPY ./default.conf /tmp/templates/conf.d/default.conf
WORKDIR /var/www
Ilya Kvashnin
  • 127
  • 1
  • 7
  • Does this answer your question? [Forcing docker to use linux/amd64 platform by default on macOS](https://stackoverflow.com/questions/65612411/forcing-docker-to-use-linux-amd64-platform-by-default-on-macos) – Federkun Sep 11 '22 at 21:07
  • 1
    If that's _not_ a duplicate, we need far more technical details to answer this. "exec format error" often means your executables are for a different CPU architecture, but it can also mean they're compiled for a completely different operating system altogether (it's the error you'd get copying MacOS executables into a Docker container run as a Linux VM, f/e). – Charles Duffy Sep 11 '22 at 21:11
  • @CharlesDuffy What technical data do you need? I can add, I just didn’t post them initially, because I don’t know what exactly might be needed. And yes, most likely the problem is that the container was not assembled under arm64, but I don’t know how to fix it. I'll take a look at the comment above. – Ilya Kvashnin Sep 11 '22 at 21:19
  • @Federkun solution in your link not helped for me. – Ilya Kvashnin Sep 11 '22 at 21:42
  • The best thing you can provide would be a [mre] -- the shortest possible code someone else can run without changes to see the same problem. In this scenario that would presumably be a Dockerfile – Charles Duffy Sep 11 '22 at 22:16
  • @CharlesDuffy I have added a dockerfile from one of the erroneous containers. But it's a work project and it connect to work net. – Ilya Kvashnin Sep 12 '22 at 04:53

0 Answers0