This container runs Dynalite (Amazon's DynamoDB emulator) with initialization script. AWS CLI is also installed.
You may mount a shell script as /initdb.sh
to run custom commands after Dynalite instance is started.
Don't forget to include $AWS_CLI_OPTIONS
in aws
command arguments, e.g.:
aws dynamodb list-tables $AWS_CLI_OPTIONS
Build:
docker build --force-rm --no-cache -t kpavlov/dynalite .
Running:
docker run --rm --name dynalite -p 8000:8000 --volume "$(pwd)/test/initdb.sh:/initdb.sh" -it kpavlov/dynalite
Running in docker-compose:
version: '3.7'
services:
dynamodb:
image: kpavlov/dynalite
ports:
- '8000:8000'
volumes:
- ./test/initdb.sh:/initdb.sh
Run test.sh
to try it.