Skip to content

Commit

Permalink
feat: add a Dockerfile for maven 3.6.1, gradle 5.4 and support java11
Browse files Browse the repository at this point in the history
  • Loading branch information
123Haynes authored and Mila Votradovec committed Aug 7, 2019
1 parent 9a95a78 commit 5ed139e
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docker/Dockerfile.gradle-5.4_java-11
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM openjdk:11-jdk-slim

MAINTAINER Snyk Ltd

RUN mkdir /home/node
WORKDIR /home/node

# Install gradle, node, cli
RUN apt-get update && \
apt-get install -y curl unzip && \
curl -L https://services.gradle.org/distributions/gradle-5.4-bin.zip -o gradle-5.4-bin.zip && \
unzip gradle-5.4-bin.zip -d /home/node/ && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs jq && \
npm install --global snyk snyk-to-html && \
apt-get autoremove -y && \
apt-get clean && \
chmod -R a+wrx /home/node

ENV HOME /home/node
ENV M2 /home/node/.m2
ENV GRADLE_HOME=/home/node/gradle-5.4
ENV PATH=$PATH:$GRADLE_HOME/bin

# The path at which the project is mounted (-v runtime arg)
ENV PROJECT_PATH /project

COPY docker-entrypoint.sh .
COPY snyk_report.css .

ENTRYPOINT ["./docker-entrypoint.sh"]

# Default command is `snyk test`
# Override with `docker run ... snyk/snyk-cli <command> <args>`
CMD ["test"]
35 changes: 35 additions & 0 deletions docker/Dockerfile.maven-3.6.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM openjdk:8-jdk-slim

MAINTAINER Snyk Ltd

RUN mkdir /home/node
WORKDIR /home/node

# Install maven, node, cli
RUN apt-get update && \
apt-get install -y curl git && \
curl -L -o apache-maven-3.6.1-bin.tar.gz https://www-eu.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
tar -xvzf apache-maven-3.6.1-bin.tar.gz && \
rm -f apache-maven-3.6.1-bin.tar.gz && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y nodejs jq && \
npm install --global snyk snyk-to-html && \
apt-get autoremove -y && \
apt-get clean && \
chmod -R a+wrx /home/node

ENV HOME /home/node
ENV M2 /home/node/.m2
ENV PATH /home/node/apache-maven-3.6.1/bin:$PATH

# The path at which the project is mounted (-v runtime arg)
ENV PROJECT_PATH /project

ADD docker-entrypoint.sh .
ADD snyk_report.css .

ENTRYPOINT ["./docker-entrypoint.sh"]

# Default command is `snyk test`
# Override with `docker run ... snyk/snyk-cli <command> <args>`
CMD ["test"]
35 changes: 35 additions & 0 deletions docker/Dockerfile.maven-3.6.1_java-11
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM openjdk:11-jdk-slim

MAINTAINER Snyk Ltd

RUN mkdir /home/node
WORKDIR /home/node

# Install maven, node, cli
RUN apt-get update && \
apt-get install -y curl git && \
curl -L -o apache-maven-3.6.1-bin.tar.gz https://www-eu.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
tar -xvzf apache-maven-3.6.1-bin.tar.gz && \
rm -f apache-maven-3.6.1-bin.tar.gz && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y nodejs jq && \
npm install --global snyk snyk-to-html && \
apt-get autoremove -y && \
apt-get clean && \
chmod -R a+wrx /home/node

ENV HOME /home/node
ENV M2 /home/node/.m2
ENV PATH /home/node/apache-maven-3.6.1/bin:$PATH

# The path at which the project is mounted (-v runtime arg)
ENV PROJECT_PATH /project

ADD docker-entrypoint.sh .
ADD snyk_report.css .

ENTRYPOINT ["./docker-entrypoint.sh"]

# Default command is `snyk test`
# Override with `docker run ... snyk/snyk-cli <command> <args>`
CMD ["test"]

0 comments on commit 5ed139e

Please sign in to comment.