1 Answer
- Newest
- Most votes
- Most comments
0
When I set the uid: 0 and gid: 0 permissions on the EFS access points, it worked correctly.
In docker-compose, specify volumes.es_data01.driver_opts.uid
and volumes.es_data01.driver_opts.gid
.
version: '3.8'
services:
elasticsearch01:
# user: $USER
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.1
# image: 645694603269.dkr.ecr.eu-west-2.amazonaws.com/smpn_ecr:latest
container_name: es02
restart: unless-stopped
environment:
cluster.name: docker-es-cluster
discovery.type: single-node
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
xpack.security.enabled: "false"
xpack.monitoring.enabled: "false"
xpack.watcher.enabled: "false"
node.name: es01
network.host: 0.0.0.0
logger.level: DEBUG
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data01:/usr/share/elasticsearch/data:rw
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: "curl -f http://localhost:9200 || exit 1"
networks:
- smpn_network
deploy:
resources:
limits:
cpus: '2.0'
memory: 2048M
volumes:
es_data01:
driver: local
driver_opts:
uid: 0
gid: 0
networks:
smpn_network:
driver: bridge
Reference
https://docs.docker.com/cloud/ecs-compose-features/#persistent-volumes https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html
answered 2 years ago
Relevant content
- asked a year ago
- asked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 9 months ago