0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Run DynamoDB Local on docker-compose.yml or Earthfile.

Last updated at Posted at 2021-12-11

DynamoDB Local

On docker-compose.yml

version: "3.9"
services:
  dynamodb:
    image: amazon/dynamodb-local:1.17.1
    ports:
      - 8000:8000
    command: -jar DynamoDBLocal.jar -dbPath /data -sharedDb 
    volumes:
      - $PWD/data:/data

On Earthfile

What is Earthly?

Earthly is often used by elixir library development

db:
    ARG DYNAMODB_VER="1.17.1"
    LOCALLY
    VOLUME "$PWD/data:/data"
    WITH DOCKER \
        --pull "amazon/dynamodb-local:$DYNAMODB_VER"
        RUN set -e; \
            timeout=$(expr $(date +%s) + 30); \
            docker run -v $(pwd)/data:/data --name dynamodb -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -dbPath /data -sharedDb;
    END
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?