Elasticsearch docker image
Did anyone manage to run elasticsearch docker image in Railway?
I created a docker image service from
elasticsearch:8.12.1
with the following env
but it keeps crashing with the following logs
It runs fine locally with railway run docker run elasticsearch:8.12.1
I have no clue how to get said logs as the container dies on exit and I can't mount a volume on another path than /usr/share/elasticsearch/data
Solution:Jump to solution
looks like the image wants a volume mounted at
/usr/share/elasticsearch/data
instead17 Replies
Project ID:
21336b7e-4344-41de-b812-f1d71747e697
please send the full dockerfile you are using
Sure, I am using the official elastic search image: https://hub.docker.com/layers/library/elasticsearch/8.12.1/images/sha256-f9a807ef8f888a9d3f9ab680bbb8917869e66d30b3d2f086eca796545040a2fe?context=explore
Dockerfile: https://github.com/elastic/dockerfiles/blob/e15eb421da49ad627d48e5b3492948c76bcb8158/elasticsearch/Dockerfile
any reason why you are using a dockerfile instead of deploying the image directly? (I have never used elastic search before)
I am using the image directly
![No description](https://cdn.answeroverflow.com/1206996331248357418/image.png)
I think the solution is this: https://stackoverflow.com/a/53097050/13735374 but I have no idea how to pull this up in Railway
you can't, is that needed?
I think so but I can't be sure as I can't access the logs when the container crashed after writing in the logs π₯²
why can't you mount a volume to
/usr/share/elasticsearch/logs
?When I do, I get this:
It somehow need a volume on
/usr/share/elasticsearch/data
to runset a service variable
RAILWAY_RUN_UID
to 0
Ok, it still doesn't work but I can move logs to the volume, I can investigate now π
progress!
Ok made some progress, it seems to be somehow related to volumes.
With no volume attached, it works fine.
When I mount a volume on
/usr/share/elasticsearch
, I get /usr/local/bin/docker-entrypoint.sh: line 49: /usr/share/elasticsearch/bin/elasticsearch-env-from-file: No such file or directory
Also, I still have the vm.max_map_count=262144 thing (https://discord.com/channels/713503345364697088/1206911735399849984/1207002891022372967) but as I understand from your previous answer, I cannot change it, right ? Any solution ?