dockerfile / elasticsearch Goto Github PK
View Code? Open in Web Editor NEWElasticSearch Dockerfile for trusted automated Docker builds.
Home Page: http://dockerfile.github.io/#/elasticsearch
License: MIT License
ElasticSearch Dockerfile for trusted automated Docker builds.
Home Page: http://dockerfile.github.io/#/elasticsearch
License: MIT License
I'm having trouble setting up my config mapping as explained here. It works fine when I test it on my host machine, but when trying to apply it to my Elasticsearch container (running this base image), there is no effect. I think that I am placing the mapping file in the wrong directory in my container.
Here is what I have done:
/usr/share/elasticsearch/config
add directories /mappings/test
/usr/share/elasticsearch/config/mappings/test
{
"item" : {
"properties" : {
"title" : {
"type" : "string",
"analyzer": "english"
}
}
}
}
After doing this, inspecting the index "test" shows that it is still using the default mappings.
{
"test" : {
"mappings" : {
"item" : {
"properties" : {
"title" : {
"type" : "string"
}
}
}
}
}
}
I'm pretty sure I'm putting my mapping file in the wrong directory. I've also tried creating the mappings directory in /etc/elasticsearch
to no avail. How can I fix this?
I installed Grafana and ES. Both in a Docker.
When I try to save a Grafana dashboard I get this error in Chrome:
XMLHttpRequest cannot load http://192.168.59.103:9200/grafana-dash/dashboard/grafana. Method PUT is not allowed by Access-Control-Allow-Methods.
I added these configs to my elasticsearch.yml
http.cors.allow-origin: "*"
http.cors.allow-methods: "OPTIONS, HEAD, GET, POST, PUT, DELETE"
Someone has any idea what I'm doing wrong? My apache where Grafana is running should also have correct headers.
Is there any reason for running elasticsearch as root?
Looks like they moved the java image.
You can pull openjdk:8
FROM openjdk:8
Would be very useful to have numbered version tags in line with elasticsearch versions. i.e.:
dockerfile/elasticsearch:1.3.1
dockerfile/elasticsearch:1.2.3
Right now I am using elasticsearch in a scala project and the client library hasn't updated itself. Which is fine, except I can't build anything except the latest version of elasticsearch, which now means I have to reference images by hashes now, not the ideal solution.
I don't know if this is possible by just adding tags on github, or by possibly tagging the hashes on dockerhub.
JUST change Dockerfile for Update to V5.4
# https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz
ENV ELASTICSEARCH_VERSION 5.4.0
ENV ELASTICSEARCH_TARBALL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz" \
ELASTICSEARCH_TARBALL_ASC="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz.asc" \
ELASTICSEARCH_TARBALL_SHA1="880b115be755a923f25aea810e3386ccb723cc55"
Unable to launch elasticsearch container when trying to mount data to volume using Docker version 1.6.2, build 7c8fca2
.
Simple example as shown in docs:
docker run -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch
returns error (in this case I was using boot2docker):
- ElasticsearchIllegalStateException[Failed to obtain node lock, is the following location writable?: [/usr/share/elasticsearch/data/elasticsearch]]
IOException[failed to obtain lock on /usr/share/elasticsearch/data/elasticsearch/nodes/49]
IOException[Cannot create directory: /usr/share/elasticsearch/data/elasticsearch/nodes/49]
I also had tried similar command on centos 7 and get similar error (always goes back to the inability to write).
I had been running similar container run command with Docker version 1.5.0-dev, build fc0329b/1.5.0
a week or so ago - and had no problems.
Anyone seen this in recent docker builds?
After starting the docker file, docker ps
shows
eff7c648dfe3 nickstenning/elasticsearch-icu "/docker-entrypoint.s" 7 seconds ago Up 6 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp
However, http://0.0.0.0:9200
and localhost:9200
refused to connect.
Hi. Thanks for setting this up.
I've been running your container using:
docker run -d -p 9200:9200 -p 9300:9300 dockerfile/elasticsearch
However, when I attach to the container, I have no prompt or ability to interact with the container, such as copying across an existing dataset to the data folder within the container. I experimented with removing the -d and using -i and -t settings thinking that might drop me into the filesystem when I attach, but that just causes errors such as:
docker run -name=elasticsearch -i -t -p 9200:9200 -p 9300:9300 dockerfile/elasticsearch bin/bash
log4j:WARN No appenders could be found for logger (node).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Any suggestions on what the right form of the run command should include to give me this ability to interact with the ES container once running?
Thanks.
Would be nice to add this plugin:
run /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
According documentation it is recomended to use the Oracle JDK version 1.8.0_25.
~$ docker pull dockerfile/elasticsearch
Pulling repository dockerfile/elasticsearch
FATA[0005] Error: image dockerfile/elasticsearch:latest not found
Hi, I am on mac. The container immediately exits when I try to map to the data or config volumes as the instructions above suggest. I can map an arbitrary volume anywhere but these two locations. I tried copying the exact config files into my local config directory but it still fails. I also tried adding the -Des.config pointing to the location of the config file on the container but that fails too.
docker run --name es -d -p 9200:9200 -p 9300:9300 -v "$PWD"/config:/usr/share/elasticsearch/config elasticsearch
docker run --name es -d -p 9200:9200 -p 9300:9300 -v "$PWD"/data:/usr/share/elasticsearch/data elasticsearch
docker run --name es -d -p 9200:9200 -p 9300:9300 -v "$PWD"/config:/config elasticsearch
I am not sure what the issue is.
I was running into a situation where I needed ES to give back a Access-Control-Allow-Origin
header. All I had to do was add a config for ES, but I'm assuming this wouldn't ideal for most use cases to let it be so open to the world by default. Do you have any thoughts?
I had install mongodb river and head plugin in the docker.
When i execute the following code, it can't synchronize data from mongodb.
But it can work well not use docker.
Anybody get trouble ?
curl -XPUT 'http://127.0.0.1:9200/_river/mongodb_source/_meta' -d '{
"type": "mongodb",
"mongodb": {
"db": "andes",
"collection": "source",
"host": "192.168.90.46",
"port": "27017"
},
"index": {
"name": "mongoindex_source",
"type": "source"
}
}'
I found this in the docker logs.
es.config is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed.
Straight from your docs:
The Docker image can be retrieved with the following command:
docker pull docker.elastic.co/elasticsearch/elasticsearch:5.4.2
Which gives:
➤ docker pull docker.elastic.co/elasticsearch/elasticsearch:5.4.2
Pulling repository docker.elastic.co/elasticsearch/elasticsearch
Error: image elasticsearch/elasticsearch:5.4.2 not found
5.4.1
works but not 5.4.2
.
Am I going mad or does one of your 4 main ways of installing elastic search currently not work?
Hello,
When I follow the instructions as in https://github.com/dockerfile/elasticsearch/blob/master/README.md:
Attach persistent/shared directories
I am unable to start the container.
I use the following command:
docker run -p 9200:9200 -p 9300:9300 -v /Users/hilben/elastic_data/:/data elasticsearch /elasticsearch/bin/elasticsearch -Des.config=/data/elasticsearch.ym
My elasticsearch.yml:
path:
logs: /data/log
data: /data/data
I receive the following error:
/docker-entrypoint.sh: line 20: /elasticsearch/bin/elasticsearch: No such file or directory
This command was working for me previously (I assume that the recent change https://blog.docker.com/2015/03/updates-available-to-popular-repos-update-your-images/ changed something)
I am using:
Docker version 1.3.0, build c78088f
Boot2Docker-cli version: v1.3.0
Git commit: deafc19
Running on OS X 10.9.5
It should be great if you add Elasticsearch GUI installation in the docker image.
Actually I have to instal successfully the gui in the running container entering in the container:
docker exec -it build_elasticsearch_1 bash
root@91cb5674cfb3:/# plugin --install jettro/elasticsearch-gui
-> Installing jettro/elasticsearch-gui...
Trying https://github.com/jettro/elasticsearch-gui/archive/master.zip...
Downloading ...................................................................................................................................................................................................................................................................................................................DONE
Installed jettro/elasticsearch-gui into /usr/share/elasticsearch/plugins/gui
Identified as a _site plugin, moving to _site structure ...
root@91cb5674cfb3:/# exit
Thanks
Regards
Gianluca
Migrating from the old /data
location to /usr/share/elasticsearch/data
so I changed my mount points (-v /data:/usr/share/elasticsearch/data
) I can see one index (.kibana), and was able to create another (customer) like in the example ES docs
curl -XPUT 'localhost:9200/customer?pretty'
and customer and .kibana now show in my data dir, but how to get elastic search to once again recognize the logstash indices?
root@fef0aed8a3c7:/usr/share/elasticsearch/data/elasticsearch/nodes/0/indices# ls -al
total 204
drwxr-xr-x 51 elasticsearch elasticsearch 4096 May 22 16:47 .
drwxr-xr-x 4 elasticsearch elasticsearch 4096 May 20 05:05 ..
drwxr-xr-x 4 elasticsearch elasticsearch 4096 Mar 29 05:56 .kibana
drwxr-xr-x 8 elasticsearch elasticsearch 4096 May 22 16:47 customer
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 29 06:10 logstash-2015.03.29
drwxr-xr-x 8 elasticsearch elasticsearch 4096 Mar 29 23:54 logstash-2015.03.30
truncated the rest of that ls -la
yet only the two indices show:
curl 'localhost:9200/_cat/indices?v'
health status index pri rep docs.count docs.deleted store.size pri.store.size
yellow open .kibana 1 1 1 0 2.5kb 2.5kb
yellow open customer 5 1 0 0 575b 575b
¿which is the best way to choose the cluster name?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.