The following is an example given in https://docker-curriculum.com/
version: "3"
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
container_name: es
environment:
- discovery.type=single-node
ports:
- 9200:9200
volumes:
- esdata1:/usr/share/elasticsearch/data
web:
image: prakhar1989/foodtrucks-web
command: python app.py
depends_on:
- es
ports:
- 5000:5000
volumes:
- ./flask-app:/opt/flask-app
volumes:
esdata1:
driver: local
and it says The volumes parameter specifies a mount point in our web container where the code will reside
about the /opt/flask-app
I think it means, /opt/flask-app
is a mount point and it points to the host machines ./flask-app
However it doesn't say anything about esdata1
and I can't apply the same explanation as given to /opt/flask-app
since there's no esdata1
directory/file in the host machine.
What is happening for the esdata1
?
My guess is that it means creating a volume (The closest thing I can think of is a disk partition) and name it esdata1
and mount it on /usr/share/elasticsearch/data
, am I correct on this guess?