0

I mount my folder /workspace/ap_news/esdata to elastic_search container, however, I cound't see any created index/ files on the host(mac os) folder.

The created indexes by elastic search only saved in the container.

It couldn't be accessed on my host os(Mac OS)

compose.yml

elasticsearch:
  image: elasticsearch:1.7.1
  hostname: elasticsearch
  ports:
    - "9200:9200"
    - "9300:9300"
  volumes:
    - /workspace/ap_news/esdata:/usr/share/elasticsearch/data

update

I've already mount the host folder to virtualbox

enter image description here

mcuadros
  • 4,098
  • 3
  • 37
  • 44
newBike
  • 14,385
  • 29
  • 109
  • 192

1 Answers1

1

If you are using a boot2docker VM (even with docker machine), make sure your host local folder is mounted first on that VM.

By default, a boot2docker (Tinycore-based) VM will mount only /Users, nothing else.

Ssh to that vm (docker machine ssh default, for instance) and do:

mount -t vboxsf -o uid=1000,gid=50 your-other-share-name /workspace/ap_news/esdata
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @newBike I believe the boot2docker.iso only shows /Users, not other mounted folders. – VonC Nov 20 '15 at 08:46
  • @newBike see https://github.com/boot2docker/boot2docker/blob/master/README.md#virtualbox-guest-additions – VonC Nov 20 '15 at 09:26