tiangolo / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose up -d issue | OCI runtime create failed

syrniellow opened this issue · comments

commented

Hi, I get the following issue in the last stage before starting the container (<project-name>:flower-1).

# command
docker-compose up -d

Assuming the project name is "myapp"

 ✔ Network myapp_default                                                                                                                                  C...                         0.0s 
 ✔ Network myapp_traefik-public                                                                                                                           Created                      0.0s 
 ✔ Volume "myapp_app-db-data"                                                                                                                             Created                      0.0s 
 ✔ Container myapp-db-1                                                                                                                                   St...                        0.4s 
 ⠿ Container myapp-flower-1                                                                                                                               Starting                     1.3s 
 ✔ Container myapp-queue-1                                                                                                                                Started                      0.7s 
 ✔ Container myapp-frontend-1                                                                                                                             Started                      0.7s 
 ✔ Container myapp-proxy-1                                                                                                                                Started                      1.1s 
 ✔ Container myapp-backend-1                                                                                                                              Started                      1.1s 
 ✔ Container myapp-pgadmin-1                                                                                                                              Started                      1.2s 
 ✔ Container myapp-celeryworker-1

 ! backend The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                              0.0s 
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--broker=amqp://guest@queue:5672//": stat --broker=amqp://guest@queue:5672//: no such file or directory: unknown

Same issue here.

I was able to "solve" this by downgrading the version of Flower to 0.9.5

flower:
-  image: mher/flower
+  image: mher/flower:0.9.5

Ah, but it seems a better solution is to add the CELERY_BROKER_URL as an environment variable:

    deploy:
        ...
-    command:
-      - "--broker=amqp://guest@queue:5672//"
-      # For the "Broker" tab to work in the flower UI, uncomment the following command argument,
-      # and change the queue service's image as well
-      # - "--broker_api=http://guest:guest@queue:15672/api//"
+    environment:
+       - CELERY_BROKER_URL=amqp://guest@queue:5672//

#420 (comment)

@syrniellow - if this is an issue on Mac M model, there is a workaround I've mentioned in #707
I hope you will find that useful.

Yep, I think the issue would be what @dudil mentioned.

Have in mind that the latest version doesn't use Celery and Flower. But in any case, if you have similar issues, the can probably be handled with the same trick. 🤓

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.