Initial Docker image
This commit is contained in:
parent
8f21de4b68
commit
3f3ebe5194
17
Dockerfile
Normal file
17
Dockerfile
Normal 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"]
|
14
README.md
14
README.md
@ -1,3 +1,17 @@
|
||||
# docker-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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user