google-java-format icon indicating copy to clipboard operation
google-java-format copied to clipboard

Create official Docker image of CLI jar

Open matthewadams opened this issue 6 years ago • 3 comments

Please create an official Docker image so that the CLI can be used without having to download the CLI jar from the releases page (and, to a lesser extent, so that it can be used without having java installed).

matthewadams avatar Jun 05 '18 20:06 matthewadams

Not official, but I pushed out a very basic one @ https://github.com/google/google-java-format/pull/303

aegixx avatar Aug 15 '18 20:08 aegixx

@matthewadams As a not-that-simple one-liner too, I'm using this:

docker run -it --rm -v $(PWD):/src openjdk:alpine sh -c "wget https://github.com/google/google-java-format/releases/download/google-java-format-1.6/google-java-format-1.6-all-deps.jar && find /src -name '*.java' | xargs java -jar google-java-format-1.6-all-deps.jar -i"

aegixx avatar Aug 15 '18 21:08 aegixx

Feel free to copy stuff from https://github.com/vandmo/google-java-format It has GitHub workflow for publishing to arm64 and amd64 which can easily be extended to more platforms.

vandmo avatar Oct 05 '23 10:10 vandmo