aaronshaf/dynamodb-admin

Docker image docs could use some improvements

Opened this issue · 0 comments

Learned about this project, but had a difficult time getting it running. Mostly because really basic simple information wasn't easily available.

1 Document how to run docker container

I should be able to just copy paste 1 command it should work , instead of me figuring it out. Should cover the most common use case.

From top of my head it would be:

docker run --rm --name dynamo-ui -it --net=host aaronshaf/dynamodb-admin

but what about environment variables? I have to read through code to figure this out.

After reading code / documentation:

docker run --rm --name dynamoui --net=host -it  aaronshaf/dynamodb-admin /bin/sh -c "DYNAMO_ENDPOINT=http://localhost:4566 node bin/dynamodb-admin.js --port 8001"

2 Ctrl+C doesn't kill docker container

Add entrypoint to allow this

#!/bin/bash

# entrypoint.sh
# start program
node bin/dynamodb-admin.js

# Store the PID of the background process in the variable PID
PID=$!

echo "STARTED SSHD PID=${PID}"

# Run a foreground process that waits for signals
trap 'kill -TERM $PID' TERM INT
wait $PID
# ...
# scroll to bottom of code
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

3 Docker hub webpage should have link to github.

i.e, if docker container doesn't work have to go read code