Ver Fonte

Run update.sh

Docker Library Bot há 9 anos atrás
pai
commit
d403024d7d
1 ficheiros alterados com 42 adições e 31 exclusões
  1. 42 31
      arangodb/README.md

+ 42 - 31
arangodb/README.md

@@ -33,27 +33,27 @@ Joins and Transactions are key features for flexible, secure data designs, widel
 
 Furthermore, ArangoDB offers a microservice framework called [Foxx](https://www.arangodb.com/foxx) to build your own Rest API with a few lines of code.
 
-ArangoDB Documentation
+#### ArangoDB Documentation
 
 -	[ArangoDB Documentation](https://www.arangodb.com/documentation)
 -	[ArangoDB Tutorials](https://www.arangodb.com/tutorials)
 
 ## How to use this image
 
-### Start an `ArangoDB` instance
+### Start an ArangoDB instance
 
 In order to start an ArangoDB instance run
 
 ```console
-$ docker run -d --name arangodb-instance arangodb
+unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance -d arangodb
 ```
 
-Will create and launch the arangodb docker instance as background process. The Identifier of the process is printed - the plain text name will be *arangodb-instance* as you stated above. By default ArangoDB listen on port 8529 for request and the image includes `EXPOST 8529`. If you link an application container it is automatically available in the linked container. See the following examples.
+Will create and launch the arangodb docker instance as background process. The Identifier of the process is printed. By default ArangoDB listen on port 8529 for request and the image includes `EXPOSE 8529`. If you link an application container it is automatically available in the linked container. See the following examples.
 
 In order to get the IP arango listens on run:
 
 ```console
-$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance
+unix> docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance
 ```
 
 ### Using the instance
@@ -61,7 +61,7 @@ $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance
 In order to use the running instance from an application, link the container
 
 ```console
-$ docker run --name my-arangodb-app --link arangodb-instance:db-link arangodb
+unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name my-app --link arangodb-instance:db-link arangodb
 ```
 
 This will use the instance with the name `arangodb-instance` and link it into the application container. The application container will contain environment variables
@@ -79,66 +79,77 @@ These can be used to access the database.
 If you want to expose the port to the outside world, run
 
 ```console
-$ docker run -p 8529:8529 -d arangodb
+unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d arangodb
 ```
 
-ArangoDB listen on port 8529 for request and the image includes `EXPOST 8529`. The `-p 8529:8529` exposes this port on the host.
+ArangoDB listen on port 8529 for request and the image includes `EXPOSE
+8529`. The `-p 8529:8529` exposes this port on the host.
 
-## Persistent Data
+### Choosing an authentication method
 
-ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These directories are marked as docker volumes.
+The ArangoDB image provides several authentication methods which can be specified via environment variables (-e) when using `docker run`
 
-A good explanation about persistence and docker container can be found here: [Docker In-depth: Volumes](http://container42.com/2014/11/03/docker-indepth-volumes/), [Why Docker Data Containers are Good](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e)
+1.	ARANGO_RANDOM_ROOT_PASSWORD=1
 
-### Using host directories
+	Generate a random root password when starting. The password will be printed to stdout (may be inspected later using `docker logs`)
 
-You can map the container's volumes to a directory on the host, so that the data is kept between runs of the container. This path `/tmp/arangodb` is in general not the correct place to store you persistent files - it is just an example!
+2.	ARANGO_NO_AUTH=1
 
-```console
-$ mkdir /tmp/arangodb
-$ docker run -p 8529:8529 -d \
-          -v /tmp/arangodb:/var/lib/arangodb \
-          arangodb
-```
+	Disable authentication. Useful for testing.
 
-This will use the `/tmp/arangodb` directory of the host as database directory for ArangoDB inside the container.
+	**WARNING** Doing so in production will expose all your data. Make sure that ArangoDB is not diretcly accessible from the internet!
+
+3.	ARANGO_ROOT_PASSWORD=somepassword
 
-## Using a custom ArangoDB configuration file
+	Specify your own root password.
 
-The ArangoDB startup configuration is specified in the file `/etc/arangodb/arangodb.conf`. If you want to use a customized ArangoDB configuration, you can create your alternative configuration file in a directory on the host machine and then mount that directory location as `/etc/arangodb` inside the `arangodb` container.
+### Command line options
 
-If `/my/custom/arangod.conf` is the path of your arangodb configuration file, you can start your `arangodb` container like this:
+In order to get a list of supported options, run
 
 ```console
-$ docker run --name some-arangodb -v /my/custom:/etc/arangodb -d arangodb:tag
+unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 arangodb arangod --help
 ```
 
-This will start a new container `some-arangodb` where the ArangoDB instance uses the startup settings from your config file instead of the default one.
+## Persistent Data
+
+ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These directories are marked as docker volumes.
+
+See `docker inspect --format "{{ .Config.Volumes}}" arangodb` for all volumes.
+
+A good explanation about persistence and docker container can be found here: [Docker In-depth: Volumes](http://container42.com/2014/11/03/docker-indepth-volumes/), [Why Docker Data Containers are Good](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e)
+
+### Using host directories
 
-Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to your new config file so that the container will be allowed to mount it:
+You can map the container's volumes to a directory on the host, so that the data is kept between runs of the container. This path `/tmp/arangodb` is in general not the correct place to store you persistent files - it is just an example!
 
 ```console
-$ chcon -Rt svirt_sandbox_file_t /my/custom
+unix> mkdir /tmp/arangodb
+unix> docker -e ARANGO_RANDOM_ROOT_PASSWORD=1 run -p 8529:8529 -d \
+          -v /tmp/arangodb:/var/lib/arangodb \
+          arangodb
 ```
 
+This will use the `/tmp/arangodb` directory of the host as database directory for ArangoDB inside the container.
+
 ### Using a data container
 
 Alternatively you can create a container holding the data.
 
 ```console
-$ docker run -d --name arangodb-persist -v /var/lib/arangodb debian:8.0 true
+unix> docker create --name arangodb-persist arangodb true
 ```
 
 And use this data container in your ArangoDB container.
 
 ```console
-$ docker run --volumes-from arangodb-persist -p 8529:8529 arangodb
+unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --volumes-from arangodb-persist -p 8529:8529 arangodb
 ```
 
-If want to save a few bytes you can alternatively use [hello-world](https://registry.hub.docker.com/_/hello-world/), [busybox](https://registry.hub.docker.com/_/busybox/) or [alpine](https://registry.hub.docker.com/_/alpine/) for creating the volume only containers. For example:
+If want to save a few bytes you can alternatively use [busybox](https://registry.hub.docker.com/_/busybox) or [alpine](https://registry.hub.docker.com/_/alpine) for creating the volume only containers. Please note that you need to provide the used volumes in this case. For example
 
 ```console
-$ docker run -d --name arangodb-persist -v /var/lib/arangodb alpine alpine
+unix> docker run -d --name arangodb-persist -v /var/lib/arangodb busybox true
 ```
 
 # License