Skip to content

Commit

Permalink
use maven image instead of downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
phith0n committed Oct 11, 2018
1 parent ac8ba00 commit 69c0235
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions jackson/CVE-2017-7525/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM maven:3-jdk-7 AS builder

MAINTAINER phithon <[email protected]>

COPY ./ /usr/src/

WORKDIR /usr/src

RUN cd /usr/src; \
mvn -U clean package -Dmaven.test.skip=true

FROM vulhub/java:7u21-jdk

LABEL MAINTAINER="b1ngz <[email protected]>"

COPY . /usr/src

RUN set -ex \
&& mkdir -p /opt/maven \
&& wget -qO- http://www-us.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz | tar zx -C /opt/maven --strip-components=1 \
&& update-alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 100 \
&& cd /usr/src \
&& mvn -U clean package -Dmaven.test.skip=true
COPY --from=builder /usr/src/target/jackson.jar /jackson.jar

EXPOSE 8080

CMD ["java", "-jar", "/usr/src/target/jackson.jar"]
CMD ["java", "-jar", "/jackson.jar"]

0 comments on commit 69c0235

Please sign in to comment.