docker-coala-base icon indicating copy to clipboard operation
docker-coala-base copied to clipboard

Checkstyle binary is not part of docker image

Open yukiisbored opened this issue 8 years ago • 4 comments

It seems the checkstyle.jar file is not part of this docker image because every time I use it with this docker image, It downloads the jar file.

$ docker run -it --rm --volumes=$(pwd):/work --workdir=/work coala/base coala
Executing section java...
[INFO][02:57:59] Downloading '/root/.local/share/coala-bears/CheckstyleBear/checkstyle.jar' for bear CheckstyleBear from http://sourceforge.net/projects/checkstyle/files/checkstyle/6.15/checkstyle-6.15-all.jar.

To confirm the fact it's not part of this docker image, I ran bash inside the docker image and see if it's there.

# ls -lah /root/.local/share/coala-bears/CheckstyleBear/checkstyle.jar
ls: cannot access '/root/.local/share/coala-bears/CheckstyleBear/checkstyle.jar': No such file or directory
# ls -lah /usr/local/share/coala-bears/CheckstyleBear/checkstyle.jar
ls: cannot access '/usr/local/share/coala-bears/CheckstyleBear/checkstyle.jar': No such file or directory
# find / -name "*checkstyle*.jar"
#

yukiisbored avatar Dec 04 '16 03:12 yukiisbored

Easy fix is to install checkstyle, and symlink the jar into /usr/local/share/coala-bears/CheckstyleBear/.

There is a related issue https://github.com/coala/coala-bears/issues/626 for configurable locations, so that it is possible to avoid creating /usr/local/share/coala-bears/CheckstyleBear/ with symlink just so the bear finds it.

Worth noting that openSUSE checkstyle are all 5.8 or lower, which isnt good enough.

However the Docker could still use maven to fetch these packages, so https://github.com/coala/coala-bears/issues/1250 is another path forward.

jayvdb avatar Jan 03 '17 20:01 jayvdb

We still have a problem with 0.10, as it uses a different filename for the cached file. ttps://travis-ci.org/coala/docker-coala-base/builds/208787231

jayvdb avatar Mar 08 '17 04:03 jayvdb

https://travis-ci.org/coala/docker-coala-base/builds/214948593

jayvdb avatar Mar 25 '17 12:03 jayvdb

The Checkstyle and Scalastyle fetches in Dockerfile should be replaced with calling https://github.com/coala/coala-bears/blob/master/.ci/deps.coala-bears.sh

jayvdb avatar May 22 '17 23:05 jayvdb