Install ArangoDB Inside Docker Container in Linux

Install ArangoDB Inside Docker Container in Linux

ArangoDB is a NoSQL and multimodel database. It supports graph, document, and key/value models. ArangoDB is an open-source project available under the Apache License 2.0.

This tutorial explains how to install ArangoDB inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install ArangoDB

  • Host network

Run the following command to create a container for ArangoDB that uses host network:

docker run -d --name=arangodb --restart=always --network=host \
    -v /opt/arangodb/data:/var/lib/arangodb3 \
    -v /opt/arangodb/apps:/var/lib/arangodb3-apps \
    -e ARANGO_ROOT_PASSWORD=pwd123 \
    arangodb
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, ArangoDB service is listening on port 8529. It can be changed with -p option.

docker network create app-net
docker run -d --name=arangodb --restart=always --network=app-net \
    -p 8080:8529 \
    -v /opt/arangodb/data:/var/lib/arangodb3 \
    -v /opt/arangodb/apps:/var/lib/arangodb3-apps \
    -e ARANGO_ROOT_PASSWORD=pwd123 \
    arangodb

Note: don't forget to change root password.

Testing ArangoDB

Open a web browser and go to http://<IP_ADDRESS>:8529, where <IP_ADDRESS> is the IP address of the system. Log in to the web interface using root username and password.

ArangoDB Inside Docker Container in Linux

Uninstall ArangoDB

To completely remove ArangoDB, remove its container:

docker rm --force arangodb

Remove ArangoDB image:

docker rmi arangodb

You can also remove ArangoDB data:

sudo rm -rf /opt/arangodb

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.