-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mongoose, Mongodb, Mockgoose, etc use kerberos 0.0.X and that requires libkrb5-dev #71
Comments
@franky-continu can you post your Dockerfile? Which image tag are you using? |
my docker file which works perfectly on all other nodejs projects but this one has something that is not letting me off the hook: FROM node:onbuild
EXPOSE 8080 I get and then my tests just hang and timeout on a Company.create (mongoose schema call) Continu API listening at http://[::]:4568
TESTS-CONFIGURING
1) "before all" hook
0 passing (2s)
1 failing
1) TESTS-CONFIGURING "before all" hook:
Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test. but locally, when kerberos is built: ---------------
> [email protected] install /Users/franky/Workspace/continu/continu-api/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
CXX(target) Release/obj.target/kerberos/lib/worker.o
CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
../lib/kerberosgss.c:509:13: warning: implicit declaration of function 'gss_acquire_cred_impersonate_name' is invalid in C99 [-Wimplicit-function-declaration]
maj_stat = gss_acquire_cred_impersonate_name(&min_stat,
^
1 warning generated.
CC(target) Release/obj.target/kerberos/lib/base64.o
CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
SOLINK_MODULE(target) Release/kerberos.node
> [email protected] install /Users/franky/Workspace/continu/continu-api/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 all tests run fine. Now when I try to install kerberos in the docker image: FROM node:onbuild
RUN apt-get update && apt-get install -y --no-install-recommends libkrb5-dev libgssapi-krb5-2
EXPOSE 8080 or FROM node:5.1.0
RUN apt-get update && apt-get install -y --no-install-recommends libkrb5-dev
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ONBUILD COPY package.json /usr/src/app/
ONBUILD RUN npm install
ONBUILD COPY . /usr/src/app
EXPOSE 8080
CMD [ "npm", "start" ] if fails by: /usr/bin/ld: cannot find -lkrb5
/usr/bin/ld: cannot find -lgssapi_krb5
> [email protected] postinstall /usr/src/app/node_modules/mongodb-prebuilt
> node install.js
/usr/src/app/node_modules/mongodb-download/index.js:127
throw new Error("unsupported release of Debian " + os.release); and: Status: Downloaded newer image for node:5.1.0
---> b32eea429a1a
Step 1 : RUN apt-get update && apt-get install -y --no-install-recommends libkrb5-dev
---> Running in b61ee612af65
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [136 kB]
Get:3 http://httpredir.debian.org jessie Release.gpg [2373 B]
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [207 kB]
Get:5 http://httpredir.debian.org jessie Release [148 kB]
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [3619 B]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9035 kB]
Fetched 9596 kB in 4s (2224 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
krb5-doc
The following NEW packages will be installed:
libkrb5-dev
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 42.2 kB of archives.
After this operation, 92.2 kB of additional disk space will be used.
Get:1 http://security.debian.org/ jessie/updates/main libkrb5-dev amd64 1.12.1+dfsg-19+deb8u1 [42.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 42.2 kB in 0s (175 kB/s)
Selecting previously unselected package libkrb5-dev.
(Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 21063 files and directories currently installed.)
Preparing to unpack .../libkrb5-dev_1.12.1+dfsg-19+deb8u1_amd64.deb ...
Unpacking libkrb5-dev (1.12.1+dfsg-19+deb8u1) ...
Setting up libkrb5-dev (1.12.1+dfsg-19+deb8u1) ...
---> 9ae94e88bf17
Removing intermediate container b61ee612af65
Step 2 : RUN mkdir -p /usr/src/app
---> Running in 5e180e259cbe
---> c6b81c1cb6f4
Removing intermediate container 5e180e259cbe
Step 3 : WORKDIR /usr/src/app
---> Running in fbe5a8ffb3cb
---> cb5b456cbc46
Removing intermediate container fbe5a8ffb3cb
Step 4 : ONBUILD copy package.json /usr/src/app/
---> Running in 8a1727e62118
---> 705e5e9c8fea
Removing intermediate container 8a1727e62118
Step 5 : ONBUILD run npm install
---> Running in dbe8babe94a5
---> 06223a54982b
Removing intermediate container dbe8babe94a5
Step 6 : ONBUILD copy . /usr/src/app
---> Running in 83be5ca75845
---> 4deda2950b3f
Removing intermediate container 83be5ca75845
Step 7 : CMD npm start
---> Running in 9caf5da654d7
---> af7c9ed76e7d
Removing intermediate container 9caf5da654d7
Step 8 : EXPOSE 8080
---> Running in f93567e4bd48
---> bf40e4351676
Removing intermediate container f93567e4bd48
Successfully built bf40e4351676
=> Executing tests in docker-compose.test.yml
Building sut...
Step 0 : FROM node:5.1.0
---> b32eea429a1a
Step 1 : RUN apt-get update && apt-get install -y --no-install-recommends libkrb5-dev
---> Using cache
---> 9ae94e88bf17
Step 2 : RUN mkdir -p /usr/src/app
---> Using cache
---> c6b81c1cb6f4
Step 3 : WORKDIR /usr/src/app
---> Using cache
---> cb5b456cbc46
Step 4 : ONBUILD copy package.json /usr/src/app/
---> Using cache
---> 705e5e9c8fea
Step 5 : ONBUILD run npm install
---> Using cache
---> 06223a54982b
Step 6 : ONBUILD copy . /usr/src/app
---> Using cache
---> 4deda2950b3f
Step 7 : CMD npm start
---> Using cache
---> af7c9ed76e7d
Step 8 : EXPOSE 8080
---> Using cache
---> bf40e4351676
Successfully built bf40e4351676
Creating builder98263_sut_1...
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "test"
npm ERR! node v5.1.0
npm ERR! npm v3.3.12
npm ERR! path /usr/src/app/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/usr/src/app/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
Removing builder98263_sut_1...
Going to remove builder98263_sut_1
Tests in docker-compose.test.yml FAILED: 254
ERROR: Build process returned exit code 1
ERROR: Build in 'master' (0b68bc48) failed in 0:01:01 |
Hi, Th onbuild image assumes you have a package.json file for installing a your app via npm. Looking at the last thing you posted, I see
|
it has the package.json that is why my first dockerfile works. I just can’t install libkrb5-dev
|
I have used moongose and MongoDB without any problems with all Docker versions of Node.js. Yes, there are some warnings about kerborose but this may only be a problem if you actually use kerborose authebtication. We inherit from Debian images and we are likely not to add any external libraries that are not required to run Node.js itself to keep the images as small as possible. You should be able to install the kerborose library dependency in your own image, I'll try to look into that issue. Also, check out my issue on why you should not rely on the |
Trigger 0, COPY package.json /usr/src/app/ Franky Diaz-Trepat
|
this Dockerfile says build ok but throws kerberos errors. Like I said in the first portion my tests only run if kerberos is installed as a peerDependency or dependency. Otherwise they just hang. I don’t use kerberos myself but there is something going on. The Dockerfile:
The Error:
Added code formatting by @Starefossen 2015-11-03 19:08 GMT+1 |
Hi @franky-continu, This may be a question better suited for the package maintainers for those modules. The Docker image is running npm and node as intended, but there are package specific dependencies and environment configurations missing. |
closing this as stale (several months have passed). Happy to reopen and revisit if this is still a problem and we find there is a problem with the Docker image itself. |
Hi my builds are failing because I cannot build kerberos on the docker image as libkrb5-dev is missing. I've collected this info while researching the issue, I'm not an expert on kerberos or anything like it.
Seems to be a pretty common library.
The text was updated successfully, but these errors were encountered: