How to best send command line args to local dynamodb docker container
See original GitHub issueSorry if this is the wrong git repo - I couldn’t find where the dockerfile for amazon/dynamodb-local
was being maintained.
2 questions here:
-
Currently, to send command line args as described here https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html it looks like I need to send the full args to the java process instead of just the args to configure the dynamodb server. So instead of running
docker run -it --rm amazon/dynamodb-local -sharedDb
I need to rundocker run -it --rm amazon/dynamodb-local -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
Would it be possible to change the entrypoint/cmd of the dockerfile to handle the java args for you and the user just pass in the extra arguments? I think the more common use case is to just specify the dynamodb args, but if a user wanted to modify the java args they should be able to override the entrypoint in their owndocker run
-
What directory in the container should I mount if I want to persist the .db file?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:14
Top GitHub Comments
Great work @dferretti-fig ! for those that want it I have created a docker-compose file off those findings
After some digging, I found the directory at
/home/dynamodblocal
, so to answer the second question, here is how I currently handle persisting my local dynamodb tables:docker run -it --rm -v %cd%:/home/dynamodblocal/data -p 8000:8000 amazon/dynamodb-local -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -dbPath ./data