I installed Dgraph through Docker and Docker-Compose on an offline server. I pulled the DGraph image from another networked computer and successfully started Dgraph with Docker-Compose. However, I could not use the Dgraph command and reported the command Not Found.Who can guide me, thank you very much
If you want to install dgraph
locally, you may want to use
curl https://get.dgraph.io -sSf | bash
Thank you for your answer, however, my server is unable to connect to the network, so perhaps this installation command is invalid for me.I can start dGraph and operate on the UI interface, but I can’t use the Dgraph command. Do you have any other Suggestions
What do you mean by this? Are you able to do git clone
?
Assuming a complete network outage, I suggest copying the dgraph
binary from docker image and copying it to $PATH
(copying it to /usr/bin
should work).
Sorry, maybe I didn’t make that clear.Here is my complete the installation process: I first on a networked computer by the following command:
docker pull dgraph/dgraph: latest
pull dgraph image, then I will mirror the deposit for the local image and copied to the target computer is offline computer, after I wrote the docker - compose documents and through the
docker - compse up - d
command starts successfully, and able to enter the UI interface to operate such .But I can’t use commands like dgraph live.Thank you very much for your patience. I will try your Suggestions. Thank you again.
Can you show the docker-compose file? You will be able to run commands like dgraph live
within the docker image (not from the host computer).
Forgive me for being a novice, but how do I use commands in the Docker image?
Should I Use the command?:
docker attach Imageid
Here is my Docker-compose file:
version: “3.2”
services:
zero:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=zero:5080
alpha:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 7080:7080
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph alpha --my=alpha:7080 --lru_mb=2048 --zero=zero:5080
ratel:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 8000:8000
command: dgraph-ratelvolumes:
dgraph:
Can you try docker container ls
and copy the container ID. Then do docker exec -it <container ID> /bin/bash
.
Thank you so much for your patience. I’ll try it tomorrow. You’re such a good man