-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
27 lines (19 loc) · 840 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM openjdk:latest
RUN apk --update add git openssh maven && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
ENV BOOT_SLEEP=0 \
JAVA_OPTS=""
RUN addgroup -S test && adduser -S -G test test && \
mkdir -p /test/clone && \
chown -R test:test /test
USER test
WORKDIR /test
RUN git clone --depth=1 https://github.com/AlexRogalskiy/object-mappers-playground /test/clone && \
cd /test/clone && \
mvn clean package --file pom.xml --show-version --batch-mode --errors --lax-checksums -DskipTests=true -P"test-jar","dev" && \
mv modules/objectmappers-benchmarks/.build/bin/io.nullables.api.playground.objectmappers.benchmarks/benchmarks.jar /test/ && \
cd /test && rm -rf /test/clone && rm -rf ~/.m2
EXPOSE 8000
CMD sleep $BOOT_SLEEP && \
java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar benchmarks.jar