petterreinholdtsen / noark5-tester

Test Noark 5 Core REST API
3 stars 3 forks source link

Add Dockerfile #4

Closed aalemayhu closed 7 years ago

aalemayhu commented 7 years ago

This makes it easy to deploy on systems where you have docker0 installed and would like to restrict the number of new packages installed on your host OS. The container is setup to execute the runtest on start.

Now you can get elasticsearch, the application and the runtest up:

$ docker run -d -p 9200:9200 elasticsearch:2.4.4 -Des.network.host=0.0.0.0
$ curl http://localhost:9200
$ curl -XPUT 'localhost:9200/_template/replicate_template' -d '{ "template" : "*", "settings" : {"number_of_replicas" : 0 } }'
$ docker run --network="host" --add-host=`hostname`:127.0.0.1 nikita5/nikita-noark5-core
$ docker run --network="host" --add-host=`hostname`:127.0.0.1 nikita5/noark5-tester