Giter Club home page Giter Club logo

docker-dynamodb's Introduction

docker-dynamodb CircleCI ImageLayers Badge

Docker Hub Badge

Run DynamoDB locally with Docker:

docker run -p 8000:8000 dwmkerr/dynamodb
open http://localhost:8000/shell

DynamoDB Local Shell Screenshot

This container has full support for all of the commandline parameters in the DynamoDB Documentation.

Instructions

To run an ephemeral instance of DynamoDB:

docker run -p 8000:8000 dwmkerr/dynamodb

If you want to have persistent data, just mount a volume from your host and set it as a data directory for DynamoDB:

docker run -v /data:/data -p 8000:8000 dwmkerr/dynamodb -dbPath /data

If you want to access tables and data created by the AWS CLI through a language SDK (Node, Java, etc), you will want to use the -sharedDb option as described in this AWS forum post:

docker run -p 8000:8000 dwmkerr/dynamodb -sharedDb

Without this option, each connection will get is own database and the data will not be accessible between different clients.

Coding

The code is structued like this:

Dockerfile     # the important thing, the actual dockerfile
makefile       # commands to build, test deploy etc
tests/         # bash scripts to test how the container works

The Dockerfile

The Dockerfile is based on OpenJDK and essentially just runs a jar file in a JRSE 7 environment.

The Makefile

The makefile contains commands to build, test and deploy. Parameters can be passed as environment variables or through the commandline.

Command Notes
make build Builds the image dwmkerr/dynamodb:latest. If a BUILD_NUM parameter is provided, also builds dwmkerr/dynamodb:BUILD_NUM.
make test Runs the test scripts.
make deploy Deploys the images to the docker hub. If you are not logged in, you're gonna have a bad time.

The Tests

The tests are simple bash scripts which check for basic capabilties which relate to the image. This means they're not there to make sure DynamoDB Local works, they're there to make sure the docker features work with the image. For example, mounting a volume to provide a persistent data directory.

Continuous Integration

CI is provided currently by Circle. Ensure you provide AWS credentials as we are using the AWS CLI (they are not used, but the CLI still checks that they are present).

Contributing

Please help out! Here are some areas I'd like to improve upon:

  • Cleaner or colourised output for the tests. Is there any simple tool to do assets in a shell script?

If you contribute, include a README.md update in your PR and I'll list your contributions here.

docker-dynamodb's People

Contributors

dwmkerr avatar kadishmal avatar virtualandy avatar

Watchers

 avatar  avatar

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.