Having problems to build a docker production image due the sharp issues on ARM

tried running it on develop still got the issue, waht did u set to get rid of the issue?

as I said my image with development builds but is not optimal to be used like that

mine doesn’t work on development either

can you gather some docker logs?

nothing much going on docker

no install errors

it just errors out when i try to start the image

but should show something in the stack trace

which plugin is throwing the error

in my case shows ```2024-04-29 23:53:23 [2024-04-29 21:53:23.068] error: Could not load js config file /opt/node_modules/@strapi/plugin-upload/strapi-server.js:
2024-04-29 23:53:23 Something went wrong installing the “sharp” module
2024-04-29 23:53:23
2024-04-29 23:53:23 Cannot find module ‘…/build/Release/sharp-linuxmusl-arm64v8.node’
2024-04-29 23:53:23 Require stack:
2024-04-29 23:53:23 - /opt/node_modules/sharp/lib/sharp.js
2024-04-29 23:53:23 - /opt/node_modules/sharp/lib/constructor.js
2024-04-29 23:53:23 - /opt/node_modules/sharp/lib/index.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/plugin-upload/server/services/image-manipulation.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/plugin-upload/server/services/index.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/plugin-upload/server/index.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/plugin-upload/strapi-server.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/utils/dist/index.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/action.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/command.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/strapi/dist/commands/index.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/strapi/dist/cli.js
2024-04-29 23:53:23 - /opt/node_modules/@strapi/strapi/bin/strapi.js ````

i have the exact same…

yarn run v1.22.19
$ strapi start
[2024-04-29 21:49:21.931] debug: ⛔️ Server wasn't able to start properly.
[2024-04-29 21:49:21.932] error: Could not load js config file /opt/app/node_modules/@strapi/plugin-upload/strapi-server.js: 
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-linuxmusl-x64.node'

and I think the problem is related to strapi/packages/core/upload/package.json at develop · strapi/strapi · GitHub, but I’m not really sure about. Needs more investigations

but i really need to solve this before i push to AWS

yes, because you use amd arch

can i change that for the docker

since for my local is running fine

what setup do you have locally?

Just the same typescript strapi project but not dockerized

and it works fine