dosubot[bot] commented on issue #2667:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2667#issuecomment-2380548021

   <!-- Answer -->
   To make a `hugegraph/hugegraph` Docker image from your own HugeGraph source 
code for backend=rocksdb and start a standalone cluster, follow these steps:
   
   1. **Build the Docker Image:**
   
      First, you need to build the Docker image from your HugeGraph source 
code. Assuming you have Docker installed and your HugeGraph source code is 
ready, create a `Dockerfile` in the root of your HugeGraph source directory 
with the following content:
   
      ```dockerfile
      FROM openjdk:8-jre
   
      # Set the working directory
      WORKDIR /hugegraph
   
      # Copy the HugeGraph source code into the container
      COPY . /hugegraph
   
      # Install necessary dependencies and build HugeGraph
      RUN ./build.sh
   
      # Expose the port
      EXPOSE 8080
   
      # Set the entrypoint
      ENTRYPOINT ["./bin/start-hugegraph.sh"]
      ```
   
      Then, build the Docker image using the following command:
   
      ```bash
      docker build -t hugegraph/hugegraph .
      ```
   
   2. **Start the Standalone Cluster:**
   
      You can start the HugeGraph server using Docker with RocksDB as the 
backend. Use the following `docker run` command to start the server:
   
      ```bash
      docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph
      ```
   
      Optional: 
      - Use `docker exec -it graph bash` to enter the container to perform 
operations.
      - Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD="true" 
hugegraph/hugegraph` to start with a built-in example graph. You can use the 
RESTful API to verify the result.
      - Use `-e PASSWORD=123456` to enable auth mode and set the password for 
admin.
   
      Alternatively, you can use Docker Compose to manage the deployment. 
Create a `docker-compose.yaml` file with the following content:
   
      ```yaml
      version: '3'
      services:
        graph:
          image: hugegraph/hugegraph
          ports:
            - 8080:8080
      ```
   
      Then, start the server using Docker Compose:
   
      ```bash
      docker-compose up -d
      ```
   
   This will start a standalone HugeGraph server with RocksDB as the backend 
<sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/README.md)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-server.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to