It fails to run on arm64 architecture because of sharp.node
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, node.js
- Domain
- build-system, infrastructure
Research direction
Start by inspecting the Docker image build that produces bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node and reproduce the failure with the reported docker run command on arm64. Verify how the sharp dependency is installed and built. Done means the arm64 image starts without the sharp.node loading error while preserving the existing image behavior.
Written by the indexing model from the issue text.
Description
Hi,
With the "fix" mentioned in issue #48, I can successfully build rocket.chat image on arm64 architecture. But when trying to run the image, I got the following exception caused by sharp.node.
$ docker run --name rocketchat -p 80:3000 --env ROOT_URL=http://localhost --link db:db rocket.chat
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run
meteor npm install --save bcrypt
in the root directory of your application.
Will load cache for users
0 records load from users
Will load cache for rocketchat_room
0 records load from rocketchat_room
Will load cache for rocketchat_subscription
0 records load from rocketchat_subscription
Will load cache for rocketchat_settings
373 records load from rocketchat_settings
Updating process.env.MAIL_URL
Starting Email Intercepter...
Will load cache for rocketchat_permissions
0 records load from rocketchat_permissions
Will load cache for rocketchat_roles
0 records load from rocketchat_roles
Exception in callback of async function: Error: /app/bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/bundle/programs/server/npm/node_modules/sharp/lib/constructor.js:10:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/bundle/programs/server/npm/node_modules/sharp/lib/index.js:3:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at npmRequire (/app/bundle/programs/server/npm-require.js:133:10)
at Module.useNode (packages/modules-runtime.js:697:18)
at fileEvaluate (packages/modules-runtime.js:342:20)
at require (packages/modules-runtime.js:238:16)
at FileUpload.js (packages/rocketchat:file-upload/server/lib/FileUpload.js:1:351)
at fileEvaluate (packages/modules-runtime.js:343:9)
at require (packages/modules-runtime.js:238:16)
at /app/bundle/programs/server/packages/rocketchat_file-upload.js:2252:1
at /app/bundle/programs/server/packages/rocketchat_file-upload.js:2266:3
at /app/bundle/programs/server/boot.js:411:36
at Array.forEach (<anonymous>)
at /app/bundle/programs/server/boot.js:220:19
at /app/bundle/programs/server/boot.js:471:5
at Function.run (/app/bundle/programs/server/profile.js:510:12)
at /app/bundle/programs/server/boot.js:470:11
The cause is that this sharp.node in meteor bundle is an x86-64 executable file.
$ file bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node
bundle/programs/server/npm/node_modules/sharp/build/Release/sharp.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f0b3b64efe073fbfdd69b6a2778eb95102b58431, stripped
It seems that we should build this sharp package from source rather than always having a x86-64 binary in there? Thanks.
Shawn
- Dominant language
- Dockerfile
- Stars
- 336
- Forks
- 226
- Avg merge
- 21d 4h
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/Docker.Official.Image
-
Difficulty 4/5 1-2 days Newbie friendliness 25/100
RocketChat/Docker.Official.Image#302 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
RocketChat/Docker.Official.Image#290 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
RocketChat/Docker.Official.Image#267 · 1 comment · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
RocketChat/Docker.Official.Image#248 · 7 comments · 6 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in RocketChat/Docker.Official.Image
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
storytold/craft-libs#1674 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AykutSarac/jsoncrack.com#616 ·