How should I loading data

If you are running docker, you should load it inside the container. You can’t do (you can, but you will complicate the whole process) a Bulkload from an external place to a “remote” (in this case, Docker is our “remote” as it lives inside a virtual machine).

What you have to do is to copy the data into the container. There are two ways to do it.

  1. Using Docker copy docker cp | Docker Docs
    e.g:
docker cp 1million.rdf mycontainer:/1million.rdf
docker cp 1million. schema mycontainer:/1million. schema

That way you have the files transferred from the host to the docker container.

  1. Use some download tool like curl. In the case of Dgraph’s docker image, you have only curl available. You can do the following.
curl -L -o 1million.rdf.gz "https://github.com/dgraph-io/tutorial/blob/master/resources/1million.rdf.gz?raw=true"

As said Ajeet. You can’t run a Dgraph Alpha at the same time you use the bulkloader. So, you have to start the Alpha after the load. Also you probably know that the bulkload separates the posting list files at out/${a number here starting from zero}/p/*. You have or use this path or move the p directory to a path of your choice. And then start the Alpha pointing to that path.

If you wanna make things easy, you should use Liveloader instead. Using liveloader you can just start you cluster and load the data “remotely”. From the host to the container pointing to the localhost or (in case of a Virtual Machine) to the VM IP.

If your docker is native and runs at localhost

dgraph live -a localhost:9080 -z localhost:5080 -f 1million.rdf -s 1million. schema

If your docker isn’t native, you have to find its IP. In general, is something like 192.168.99.100

dgraph live -a 192.168.99.100:9080 -z 192.168.99.100:5080 -f 1million.rdf -s 1million. schema

This is probably happening due to some confusion about one of the tools (live and bulk). If you use bulkloader with a zero that already has been used, this error may happen. You should start from scratch in both cases. Unless you are used to Dgraph you can try other ways of loading data with an already running cluster.

Cheers.