Hi @vikram_singh ,
I think that the issue is that that file isn't on the docker container, it's in the working directory where your docker compose file is. The docker container doesn't automatically share a filesystem with the system that docker is mounted on. Some posts that might help explain this:
I'm not a docker expert, and am not as familiar with using docker compose
. But when I've used docker run
to add a volume, it's been like:
docker run -p 3002:3002 --name=workplace \
-e elasticsearch.host='http://host.docker.internal:9200' \
-e elasticsearch.username=elastic \
-e elasticsearch.password=changeme \
-e allow_es_settings_modification=true \
-e secret_management.encryption_keys='[4a2cd3f81d39bf28738c10db0ca782095ffac07279561809eecc722e0c20eb09]' \
-e ENT_SEARCH_DEFAULT_PASSWORD=changeme \
-e ent_search.listen_port=3002 \
-e ent_search.external_url='http://localhost:3002' \
-e ent_search.ssl.enabled=true \
-e ent_search.ssl.keystore.path=/usr/share/enterprise-search/keystore.jks \
-e ent_search.ssl.keystore.password=changeme \
-e ent_search.ssl.keystore.key_password=changeme \
-v /home/elasticuser/mytest/docker-elk-masterxpack:/usr/share/enterprise-search \
docker.elastic.co/enterprise-search/enterprise-search:7.10.2
notice in particular here the /usr/share/enterprise-search
is where Enterprise Search is installed on the docker container's filesystem. So:
-e ent_search.ssl.keystore.path=/usr/share/enterprise-search/keystore.jks \
is a path to a file on the container (not on the host machine's filesystem), and
-v /home/elasticuser/mytest/docker-elk-masterxpack:/usr/share/enterprise-search \
tells docker that the volume should map the local /home/elasticuser/mytest/docker-elk-masterxpack
to the container /usr/share/enterprise-search
.
Note that I don't know what files you have in /home/elasticuser/mytest/docker-elk-masterxpack
other than the java keystore file, so you might want to give it its own directory if you don't want to mount a ton of other files.
Give those articles a read, and let me know if you're still having issues. We're going to get this working for you, I'm confident.