Trying to play with RavenDb + Docker Image on localhost.

439 views
Skip to first unread message

Justin A

unread,
Jul 30, 2018, 11:47:17 PM7/30/18
to RavenDB - 2nd generation document database
Hi :)

So i'm playing around with trying to get RavenDb running locally on my machine using Docker. I'm just starting to learn Docker also (massive disclaimer, obviously).

So, there's two official documents that i'm reading/referencing from:


So I tried this and things didn't work:

docker run -p 8080:8080 ravendb/ravendb:windows-nanoserver-latest

The image downloaded + container started. But I just cannot connect to the container using https://localhost:8080

<snip starting log data>

Server available on: http://fcf5fb9f5737:8080
Tcp listening on 192.168.52.173:38888

Google chrome browser keeps saying: 

ERR_CONNECTION_TIMED_OUT

So then in the dockerhub docs, it says this/

To use in localhost dev, use these env settings:

RAVEN_ARGS='--Setup.Mode=None'
RAVEN_Security_UnsecuredAccessAllowed='PrivateNetwork'

But i'm not sure how to do this. I tried adding -e RAVEN ARGS='--Setup.Mode=None' to the END of my docker run command, but it failed (docker fails to run with some 'cant find file' error msg)...

So i'm not to sure what to do, here.

-me-

Oren Eini (Ayende Rahien)

unread,
Jul 31, 2018, 2:16:22 AM7/31/18
to ravendb
The linux docker instance has a lot more attention. You can use: 
docker run -p 8080:8080 ravendb/ravendb




Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Grzegorz Lachowski

unread,
Jul 31, 2018, 2:28:46 AM7/31/18
to rav...@googlegroups.com
Justin,

As far as I remember the -e ENVVAR='value' along with other switches and options must go BEFORE the image name - ravendb/ravendb.
You can supply multiple -e options to pass multiple environment variables.

Hope this helps,
Thanks,
Greg

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Justin A

unread,
Aug 15, 2018, 9:09:49 AM8/15/18
to RavenDB - 2nd generation document database
Sorry for the delay reply - been busy and haven't had a chance to figure this stuff out.

So armed with the suggestion(s) above and also the info from the Docker Hub page, i've been trying this:

docker run --rm -it -p 161:161 -p 38888:38888 -p 8080:8080 --name RavenDb-InRAM-DEV  -e RAVEN_ARGS='--Setup.Mode=None' -e RAVEN_Security_UnsecuredAccessAllowed='PrivateNetwork' ravendb/ravendb

but it's still not working -> going to localhost:8080 shows me the EULA still :(

-me-

Oren Eini (Ayende Rahien)

unread,
Aug 15, 2018, 9:48:53 AM8/15/18
to ravendb
Try:

-e RAVEN_ARGS='--Setup.Mode=None --License.Eula.Accepted=true'

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Justin A

unread,
Aug 15, 2018, 7:22:37 PM8/15/18
to RavenDB - 2nd generation document database
oooo ... getting closer.

So it does initially work, where the server is running and I don't need to accept the EULA.

but as per my development workflow, i enter ResetServer in the admin-cli and ... it restarts ... but I'm back at the RavenDb Setup Wizard :( It's like, my args provided aren't .. remembered?

Secondly - how do I know if this is "InMemory/RAM" mode?

cheers!

Oren Eini (Ayende Rahien)

unread,
Aug 16, 2018, 1:40:31 AM8/16/18
to ravendb
This isn't in memory mode.

Try passing the arguments as env variables (so they'll be remembered).


Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--

Justin A

unread,
Aug 16, 2018, 2:56:11 AM8/16/18
to RavenDB - 2nd generation document database
This isn't in memory mode.


Is it possible to do, though? Like in the old days where we could pass some cli arg?
 
Try passing the arguments as env variables (so they'll be remembered).

Hmm... i thought i was passing these as env vars to docker..

<checks docs again>

Okay .. lots of trial and error, here's the command that now works:

docker run --rm -it -p 161:161 -p 38888:38888 -p 8080:8080 --name RavenDb -e RAVEN_Setup_Mode=None -e RAVEN_License_Eula_Accepted=true -e RAVEN_Security_UnsecuredAccessAllowed='PrivateNetwork' ravendb/ravendb

1. The documentation (https://ravendb.net/docs/article-page/4.0/csharp/server/configuration/configuration-options)  lists Environmental settings as AAA.BBB... <-- full stops/periods to delimit the configuration key/subkey. e.g. RAVEN_Setup.Mode=None. The full stops don't work, Need to replace them with underscores. Maybe that works on windows? I'm playing with a Linux RavenDB docker image.
2. For people wondering what are the configuration keys avail? I found them in the RavenDB documentation under Server->Configuration-><Some Section>   ref: https://ravendb.net/docs/article-page/4.0/csharp/server/configuration/configuration-options

phew. epic!

finally getting closer... :) Maybe the docs need a mention about docker + underscores? 

cheers again for the help!

-me-

Oren Eini (Ayende Rahien)

unread,
Aug 16, 2018, 4:04:44 AM8/16/18
to ravendb
Yes, sometimes the dots don't work and you need underscores.
To run in memory, use: 

-e RAVEN_RunInMemory=true



Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--

Justin A

unread,
Aug 16, 2018, 8:26:26 AM8/16/18
to RavenDB - 2nd generation document database
When you use RunInMemory=true is there any specific text in the CLI that suggests that this is happening? Or in the dashboard?

I remember in the previous version of RavenDB, when setting this equivalent setting, the ascii text at the start would hint that you are using RAM mode, etc.

-me-

Oren Eini (Ayende Rahien)

unread,
Aug 16, 2018, 10:39:21 AM8/16/18
to ravendb
We don't output this now. You can get that info from http://live-test.ravendb.net/databases/benchmarkdb/debug/storage/report

Oren Eini
CEO   /   Hibernating Rhinos LTD
Mobile:  972-52-5486969  Skype:  ayenderahien
Sales:  sa...@ravendb.net  Support:  sup...@ravendb.net

--

Maxim Buryak

unread,
Aug 16, 2018, 10:53:54 AM8/16/18
to rav...@googlegroups.com
We do not have an easily visible indication for that. 
You could either view the current database configuration from the Admin JS Conse (under Manage Server), choosing the right database and entering the script 
"return database.Configuration.Core;"

1) enter script mode by typing:  
script database ["your database name"]

2) enter script 
return database.Configuration.Core;
EXEC



--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages