GithubHelp home page GithubHelp logo

docker-arangodb's Introduction

ArangoDB Dockerfile

A Dockerfile that produces a Docker Image for ArangoDB.

ArangoDB version

The master branch currently hosts ArangoDB 2.2.

Different versions of ArangoDB are located at the github repo branches.

Usage

Build the image

To create the image frodenas/arangodb, execute the following command on the docker-arangodb folder:

$ docker build -t frodenas/arangodb .

Run the image

To run the image and bind to host port 8529:

$ docker run -d --name arangodb -p 8529:8529 frodenas/arangodb

The first time you run your container, a new user arango with all privileges will be created with a random password. To get the password, check the logs of the container by running:

docker logs <CONTAINER_ID>

You will see an output like the following:

========================================================================
ArangoDB User: "arango"
ArangoDB Password: "WbvIcyqXey0XlZgI"
========================================================================

Credentials

If you want to preset credentials instead of a random generated ones, you can set the following environment variables:

  • ARANGODB_USERNAME to set a specific username
  • ARANGODB_PASSWORD to set a specific password

On this example we will preset our custom username and password:

$ docker run -d \
    --name arangodb \
    -p 8529:8529 \
    -e ARANGODB_USERNAME=myusername \
    -e ARANGODB_PASSWORD=mypassword \
    frodenas/arangodb

Databases

If you want to create a database at container's boot time, you can set the following environment variables:

  • ARANGODB_DBNAME to create a database

On this example we will preset our custom username and password and we will create a database:

$ docker run -d \
    --name arangodb \
    -p 8529:8529 \
    -e ARANGODB_USERNAME=myusername \
    -e ARANGODB_PASSWORD=mypassword \
    -e ARANGODB_DBNAME=mydb \
    frodenas/arangodb

Persistent data

The ArangoDB server is configured to store data in the /data directory inside the container. You can map the container's /data volume to a volume on the host so the data becomes independent of the running container:

$ mkdir -p /tmp/arangodb
$ docker run -d \
    --name arangodb \
    -p 8529:8529 \
    -v /tmp/arangodb:/data \
    frodenas/arangodb

There are also additional volumes at:

  • /var/log/arangodb which exposes ArangoDB's log files
  • /etc/arangodb which exposes ArangoDB's configuration

Copyright

Copyright (c) 2014 Ferran Rodenas. See LICENSE for details.

docker-arangodb's People

Contributors

frodenas avatar rkoster avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

pmario rkoster yguad

docker-arangodb's Issues

Unable to authenticate against the created database

To reproduce the problem:

docker run -d \
     --name arangodb \
     -p 8529:8529 \
     -e ARANGODB_USERNAME=myusername \
     -e ARANGODB_PASSWORD=mypassword \
     -e ARANGODB_DBNAME=mydb \
     frodenas/arangodb

Test to show authentication works:

curl http://myusername:[email protected]:8529/_db/_system/_api/database/
{"result":["_system","mydb"],"error":false,"code":200}

Does not work when switching to mydb:

curl -I http://myusername:[email protected]:8529/_db/mydb/_api/database/current
HTTP/1.1 401 Unauthorized
Server: ArangoDB
Content-Type: text/plain; charset=utf-8
Www-Authenticate: basic realm="arangodb"
Connection: Keep-Alive
Content-Length: 0

Apparently user are created per database as explained here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.