Skip to content

Instantly share code, notes, and snippets.

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 \
&& wget -q \
&& 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
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