full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

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

Open syrniellow opened this issue 1 year ago • 5 comments

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

syrniellow avatar Jun 07 '23 20:06 syrniellow

Same issue here.

FunkyDialUpDude avatar Jun 09 '23 20:06 FunkyDialUpDude

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

Tom-Camp avatar Jun 19 '23 19:06 Tom-Camp

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//

https://github.com/tiangolo/full-stack-fastapi-postgresql/issues/420#issuecomment-961683059

Tom-Camp avatar Jun 19 '23 19:06 Tom-Camp

@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.

dudil avatar Mar 13 '24 17:03 dudil

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. :nerd_face:

tiangolo avatar Mar 13 '24 18:03 tiangolo

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

github-actions[bot] avatar Mar 24 '24 00:03 github-actions[bot]