Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker dynamodb -sharedDb option

I'm trying to start dynamodb on localhost via, using official repo

I tried the following

docker run -p 8000:8000 amazon/dynamodb-local -sharedDb
docker run -p 8000:8000 amazon/dynamodb-local --sharedDb
docker run -p 8000:8000 amazon/dynamodb-local --sharedDb --dbPath=/usr/local/var/dynamodb
docker run -p 8000:8000 amazon/dynamodb-local -sharedDb -dbPath=/usr/local/var/dynamodb
docker run -p 8000:8000 amazon/dynamodb-local -sharedDb -dbPath /usr/local/var/dynamodb

and I just get the following message

Unrecognized option: -sharedDb
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

or

Unrecognized option: -dbPath
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

How do I pass options to dynamodb? I took those from official docs

like image 941
zhisme Avatar asked Jun 20 '26 17:06

zhisme


1 Answers

The Compose samples in the AWS docs look like the image is configured with ENTRYPOINT ["java"], so you have to start the options (the command string) with -jar DynamoDBLocal.jar to tell the JVM what to run.

docker run -p 8000:8000 amazon/dynamodb-local \
  -jar DynamoDBLocal.jar -sharedDb
like image 167
David Maze Avatar answered Jun 23 '26 07:06

David Maze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!