Docker build issues

Hi,

having some issues creating a Docker image… everything was working several days ago and now it’s borked.

I using Meteor 1.8.3

any ideas please?

When I docker build I see the following errors:

FULL HUST off out put here, was too larger for forum: https://gist.github.com/adamgins/13baef6356f44a9929874d9d9f8c0192

Subset / end of log here



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-20T18_58_33_736Z-debug.log
The command '/bin/sh -c bash $METEORD_DIR/lib/build_app.sh' returned a non-zero code: 1

results of npm ls is here https://gist.github.com/adamgins/44ab6b12cf5055bd8ec2cb41eaefac89

I have tried meteor reset and removing node_modules no luck with this either

also tried meteor npm i bcrypt

Adams-MacBook-Pro:buzzy7 adamginsburg$ npm i bcrypt

npm WARN deprecated bcrypt@0.8.7: bcrypt < v2.0.0 is susceptible to bcrypt wrap-around bug. Upgrade to bcrypt >= v2.0.0 for improved support for newer bcrypt hashes

> bcrypt@0.8.7 install /Users/adamginsburg/Documents/development/buzzy7/node_modules/bcrypt

> node-gyp rebuild

CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o

CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o

CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o

SOLINK_MODULE(target) Release/bcrypt_lib.node

npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

npm WARN bl@0.7.0 requires a peer of stream-browserify@* but none is installed. You must install peer dependencies yourself.

npm WARN recorderjs@1.0.1 requires a peer of browserify@^5.11.1 but none is installed. You must install peer dependencies yourself.

npm WARN recorderjs@1.0.1 requires a peer of workerify@^0.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN selectize@0.12.6 requires a peer of jquery@^1.7.0, ^2, ^3 but none is installed. You must install peer dependencies yourself.

npm WARN buzzy7@1.0.2 No description

@abernix - any help please?

are you sure you don’t have update to Meteor 1.9 ?

0.8.7 is too old.
We’re on Meteor 1.8.2 and use bcrypt@3.0.4
Our Meteor 1.9 branch uses bcrypt@3.0.7
Try updating it in package.json.

1 Like

Thanks @jramer will try that

Have a look at bcrypt’s Node version compatibility table:

bcrypt 0.8.7 is designed to work with Node 0.11, which was the release line from 2013-2014
Meteor 1.8 uses Node 8
and 1.9 uses Node 12

1 Like

After updated bcrypt to 3.0.4., it still throws the errors as @adamginsburg posted in the logs.

To me, when looking into the logs, it seems more like the canvas package is out-dated.

After updated Canvas, it now throws different errors related to fibers. The logs on my side show that Docker tries to build the project with Meteor 1.9 even it’s on 1.8.1.

I had a similar issue in our CI pipeline, which I resolved by adding a meteor --version line before meteor npm ci, which forced it to initalize the correct version of meteor for the app (from .meteor/release)
Apparently meteor npm will just use latest if the locally needed version isn’t available. Which sounds like a bug

Looking at OP’s full logs, it looks like it was trying to build canvas from source, but the pkg-config failed and then it tried to install via canvas-prebuilt.
Looking at the prebuilt releases for 1.6.11, it should support Node 8 (Meteor 1.8) via ABI 57 for 64bit linux
Note that the latest version of Node that is supported for canvas 1.6.11 is Node 10 via ABI 64, so you’ll need to update canvas when updating to Meteor 1.9, which has some breaking changes to canvas > 2

So yeah, looks like docker is installing 1.9 and using that node version to build binaries, instead of the Meteor version in .meteor/release

Not sure if the solution is to use Docker containers with the exact Meteor release, or to fix Meteor so it uses the right version when running meteor npm in a container

Thanks for the information @coagmano Re. CI pipeline, it’s a good point to force it to use local meteor version.

I fixed my issue by updating the other packages without updating meteor to 1.9, please see the ones that were updated:

1 Like