Hi all,
I am facing a issue after running the script from the docker-compose to install s3 plugin and restart the elastic search. Its failing with an error as mentioned below. Can anyone help how can we successfully run the script from the docker-compose.yaml?
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster1
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
- ./es.yml: /usr/share/elasticsearch.yml
command: bash -c "entrypoint.sh"
entrypoint.sh
#!/bin/bash
set -x
#Add the Storage keys
AWS_S3_ACCESS=
ACCESS_SECRET_KEY=
ENV=default
Install the S3 repository plugin
/usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3 --batch
echo "Starting Elasticsearch service"
/usr/share/elasticsearch/bin/start_es.sh
Error:
startContainer.sh: line 5: export: `/bin/bash': not a valid identifier
startContainer.sh: line 5: export: -c: invalid option
export: usage: export [-fn] [name[=value] ...] or export -p
/bin/bash
exited with code 2
Regards
Pradeep