Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM openjdk:9-jre AS build
## Deps to install DynamoDB
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
coreutils \
ca-certificates \
&& mkdir -p /dynamodb/data
WORKDIR /dynamodb
## Install Dynamo
RUN wget -q https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz \
&& wget -q https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz.sha256 \
&& sha256sum dynamodb_local_latest.tar.gz.sha256 \
&& tar -xzf dynamodb_local_latest.tar.gz \
&& rm dynamodb_local_latest.tar.gz*
FROM openjdk:9-jre
COPY --from=build /dynamodb /dynamodb
EXPOSE 8000
WORKDIR /dynamodb
CMD ["java", "-Djava.library.path=./DynamoDBLocal_lib", "-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "/dynamodb/data"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment