Support dockerized environment
henhal opened this issue · comments
Since I bought a MacBook with the M1 chip, all my projects using dynamodb-localhost (indirectly through serverless-dynamodb-local) are a pain, since the Java version of DynamoDB does not work on Apple Silicon.
There are several issues in dependent repos about this problem. StackOverflow's best answer is to install a separate Java environment within Rosetta, or even a separate entire brew installation, but this is really a hassle and comes with some issues.
I'm not sure if anyone is working on providing the missing (SQLite) library for arm64, but in the meantime, I was wondering if this project would be interested in offering support for running DynamoDB through docker, since that actually works fine on M1 macs?
It would save a ton of hassle for users who are today stuck with having to install Java under Rosetta 2 and then somehow get the rest of their environment running on native Apple architecture to interact with DynamoDB in a Java installation in an emulated i386 shell?
Basically the only difference is that instead of calling java -jar DynamoDB.jar <options>
you call docker run -d -p 8000:8000 amazon/dynamodb-local -jar DynamoDB.jar <options>
, and I was thinking this could either be a new option within the options
passed to start()
, or a separate startDocker()
, or possibly controlled through an environment variable.
I'd be happy to give a PR a shot if interesting.
I whipped up a PR #64, feedback appreciated!
Fixed by #64