Building With Docker Container¶
Nebula Graph has provided a docker image with the whole compiling environment vesoft/nebula-dev, which will make it possible to change source code locally, build and debug within the container. Performing the following steps to start quick development:
Pull Image From Docker Hub¶
bash> docker pull vesoft/nebula-dev
Run Docker Container¶
Run docker container and mount your local source code directory into the container working_dir /home/nebula
with the following command.
bash> docker run --rm -ti \
--security-opt seccomp=unconfined \
-v /path/to/nebula/directory:/home/nebula \
-w /home/nebula \
vesoft/nebula-dev \
bash
Replace /path/to/nebula/directory
with your local nebula source code directory.
Compiling Within the Container¶
docker> mkdir _build && cd _build
docker> cmake ..
docker> make
docker> make install
Run Nebula Graph service¶
Once the preceding installation is completed, you can run Nebula Graph service within the container, the default installation directory is /usr/local/nebula/
.
docker> cd /usr/local/nebula
Rename config files of Nebula Graph service.
docker> cp etc/nebula-graphd.conf.default etc/nebula-graphd.conf
docker> cp etc/nebula-metad.conf.default etc/nebula-metad.conf
docker> cp etc/nebula-storaged.conf.default etc/nebula-storaged.conf
Start service.
docker> ./scripts/nebula.service start all
docker> ./bin/nebula -u root -p nebula --port 3699 --addr="127.0.0.1"
nebula> SHOW HOSTS;