Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.github
.gradle
bin
target
build
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM amazoncorretto:17-al2-jdk

# Create a user
RUN yum update -y && \
yum install -y shadow-utils && \
yum clean all && \
rm -rf /var/cache/dnf
RUN groupadd -r appuser && \
useradd -m -r -g appuser appuser
USER appuser

WORKDIR /app/
RUN chown -R appuser:appuser /app

# Install Gradle
COPY --chown=appuser:appuser ./gradle/ /app/gradle/
COPY --chown=appuser:appuser ./gradlew /app/
RUN ./gradlew --version --no-daemon

# Install dependencies
COPY --chown=appuser:appuser ./build.gradle ./settings.gradle /app/
RUN ./gradlew dependencies --no-daemon

# Build project
COPY --chown=appuser:appuser . /app/
RUN ./gradlew build shadowJar --no-daemon

# Disable building a JAR because we already built it.
ENV SHADOW=No
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ If you wish to run _all_ benchmarks used to generate the reports above,
you can run `./run-everything`. This will take several hours to complete, so
be patient.

## Run on Docker

You can use Docker if you wish to reproduce the consistent environment
or to run benchmarks in a separate safe environment.

Prerequisites:

* Docker

Build and run:

docker build -t java-json-benchmark:latest .
docker run --rm -it java-json-benchmark:latest ./run deser

## Run on AWS

Prerequisites:
Expand Down