Initial Docker image

This commit is contained in:
IamTheFij 2019-03-19 17:52:18 -07:00
parent 8f21de4b68
commit 3f3ebe5194
2 changed files with 32 additions and 1 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM openjdk:13-alpine
LABEL author="ian@iamthefij.com"
ENV VERSION=6.12.0
RUN apk add bash curl unzip
RUN curl -L -o pmd.zip https://github.com/pmd/pmd/releases/download/pmd_releases%2F${VERSION}/pmd-bin-${VERSION}.zip && \
unzip pmd.zip && \
rm pmd.zip
RUN mv /pmd-bin-${VERSION} /pmd
WORKDIR /pmd
USER nobody
ENTRYPOINT ["./bin/run.sh", "pmd"]

View File

@ -1,3 +1,17 @@
# docker-pmd
OpenJDK based Docker image for running PMD
OpenJDK based Docker image for running PMD
## Usage
To run, create a rules.xml file, or download one from the [git repo](https://github.com/pmd/pmd).
After that, you can run using the following command:
docker run -v $(pwd):/src:ro --rm iamthefij/pmd -d /src -f textcolor -R /src/quickstart.xml
## Building
Clone this repo and then run
docker build -f Dockerfile . -t pmd-test