/docker-dynamodb-local

docker image for AWS dynamodb-local

Primary LanguageDockerfile

docker-dynamodb-local

A Dockerfile for AWS dynamodb-local built on alpine linux so it's tiny.

It's on docker-hub and github

tags and links

running

The docker entrypoint is set to run dynamodb-local with default options: the default command adds -dbPath set to /dynamodb_data.

Get list of available command line options

docker run --rm fingershock/dynamodb-local -help
usage: java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar
            [-port <port-no.>] [-inMemory] [-delayTransientStatuses]
            [-dbPath <path>][-sharedDb] [-cors <allow-list>]
 -cors <arg>                Enable CORS support for javascript against a
                            specific allow-list list the domains separated
                            by , use '*' for public access (default is
                            '*')
 -dbPath <path>             Specify the location of your database file.
                            Default is the current directory.
 -delayTransientStatuses    When specified, DynamoDB Local will introduce
                            delays to hold various transient table and
                            index statuses so that it simulates actual
                            service more closely. Currently works only for
                            CREATING and DELETING online index statuses.
 -help                      Display DynamoDB Local usage and options.
 -inMemory                  When specified, DynamoDB Local will run in
                            memory.
 -optimizeDbBeforeStartup   Optimize the underlying backing store database
                            tables before starting up the server
 -port <port-no.>           Specify a port number. Default is 8000
 -sharedDb                  When specified, DynamoDB Local will use a
                            single database instead of separate databases
                            for each credential and region. As a result,
                            all clients will interact with the same set of
                            tables, regardless of their region and
                            credential configuration. (Useful for
                            interacting with Local through the JS Shell in
                            addition to other SDKs)

Run with default configuration which persists data to a volume at /dynamodb_data. The volume can be bind-mounted to a host directory if desired.

docker run --rm -P fingershock/dynamodb-local 

Adding additional command line options resets the default Docker CMD so it must be added to keep the behavior

docker run --rm -P fingershock/dynamodb-local -dbPath /dynamodb_data -sharedDb