diff --git a/Dockerfile b/Dockerfile index e69de29..bae5993 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM openjdk:7 + +RUN apt-get update -yqq && apt-get install -yqq curl + +RUN curl -L https://downloads.sourceforge.net/project/checkstyle/checkstyle/8.0/checkstyle-8.0-all.jar > /checkstyle.jar + +ADD checkstyle.sh /usr/bin/checkstyle +RUN chmod +x /usr/bin/checkstyle diff --git a/README.md b/README.md index e69de29..fc99fd8 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,15 @@ +# checkstyle-docker +Docker image for running checkstyle + + +## How to use (Sample gitlab-ci) +``` +stages: + - test + +test: + image: solucionesgbh/checkstyle + script: + - checkstyle - + +``` diff --git a/checkstyle.sh b/checkstyle.sh new file mode 100644 index 0000000..e27ed7a --- /dev/null +++ b/checkstyle.sh @@ -0,0 +1,2 @@ +#!/bin/bash +java -jar /checkstyle.jar -c "@"