Reputation:
from my node scripts I need to execute mongoimport
via the exec
function from child_process
. When it comes to the CI tests in the docker image I run into a problem:
/bin/sh: 1: mongoimport: not found
Now I inserted the installation of mongodb in the drone.yml file:
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
- echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.2 main" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
- apt-get update
- apt-get install -d -y mongodb-org-tools
But still mongoimport isn't found. I even added the root /
to the PATH variable or made a
find / -name "mongoimport"
Nothing.
Has anyone an idea, how to get mongoimport working in the docker image?
Thank you.
PS.: Here's the output from apt-get:
$ apt-get install -d -y mongodb-org-tools
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
mongodb-org-tools
0 upgraded, 1 newly installed, 0 to remove and 102 not upgraded.
Need to get 31.4 MB of archives.
After this operation, 135 MB of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/debian/ jessie/mongodb-org/3.2/main mongodb-org-tools amd64 3.2.14 [31.4 MB]
Fetched 31.4 MB in 1s (28.2 MB/s)
Download complete and in download only mode
Upvotes: 2
Views: 2416
Reputation:
Solved: I tried to install the wrong package.
- apt-get install -d -y mongodb-org-tools
It must be
- apt-get install -y mongodb-org
Then automatically the mongodb-org-tools are installed together with some other packages. Now mongoimport can be used
$ find / -name "mongoimport" -ls > out.txt
$ cat out.txt
2038 10588 -rwxr-xr-x 1 root root 10839312 Jun 13 22:30 /usr/bin/mongoimport
Upvotes: 1