I am very new to docker and wonder how I can get access to an export that I have completed. I am using the standard docker-compose (provided by Dgraph) and can access the export via the terminal inside the docker image, but can’t seem to interact with it outside of docker.
Here is my docker file (note this is only used for local development):
version: "3.2" services: zero: image: dgraph/dgraph:latest volumes: - /tmp/data:/dgraph ports: - 5080:5080 - 6080:6080 restart: on-failure command: dgraph zero --my=zero:5080 alpha: image: dgraph/dgraph:latest volumes: - /tmp/data:/dgraph ports: - 8080:8080 - 9080:9080 restart: on-failure command: dgraph alpha --my=alpha:7080 --zero=zero:5080 --security whitelist=0.0.0.0/0
I can then go inside the docker container by using Docker for Mac and can see the exports in the
However, how can I have this export available in the root of my project (aka outside of docker?). My goal is to export a copy of the db locally when I want to take a snapshot, and import it locally when I want to use that snapshot (I would also be using this to run tests).
What changes to I need to make to the docker-compose, or what scripts can I use to access the export inside of the image and copy it outside to my project folder?