-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
Description
I'm using Docker 1.13.1 on Mac OS X 10.11.6.
I have a Dockerfile that derives from the arangodb 3.1.11 image and COPY
s a JavaScript file into /docker-entrypoint-initdb.d so it'll be run when the database is initialized. However, I get the following error when the script runs:
arango_1 | 2017-02-22T07:20:58Z [109] ERROR JavaScript exception in file '/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js' at 97,7: ArangoError 2001: Could not connect to 'http+tcp://127.0.0.1:8529' 'connect() failed with #111 - Connection refused'
arango_1 | 2017-02-22T07:20:58Z [109] ERROR ! throw error;
arango_1 | 2017-02-22T07:20:58Z [109] ERROR ! ^
The error is thrown from the first function call that tries to talk to the database, in my case db._createDatabase(...)
.
I did find a workaround for this, which was to put the following shell script into /docker-entrypoint-initdb.d instead of the js file:
#!/usr/bin/bash
/usr/bin/arangosh --server.authentication false --server.endpoint unix:///tmp/arangodb-tmp.sock \
--javascript.execute /path/to/my/init/script.js
The initial --server.*
arguments are taken from the arangosh
invocations in docker-entrypoint3.sh.
So my question is, shouldn't the arangosh
call on line 73 also have those same two arguments?
mishak87