librespot-org / librespot-java

The most up-to-date open source Spotify client
Apache License 2.0
379 stars 93 forks source link

example Dockerfile for building librespot-java #780

Open tagdara opened 10 months ago

tagdara commented 10 months ago

There are a few folks, including myself, who are trying to repair librespot-java but don't have much Java experience or a Java development environment.

This is the Dockerfile I've been using to build the necessary app-xxx.jar file.

After building, to extract it you can do something like:

container_id=$(docker create "librespot-java")
docker cp "$container_id:/app/build/*.jar" .
docker rm "$container_id"

Hopefully this helps anyone who is looking to work on contributions.

devgianlu commented 10 months ago

Thank you, but I think you should consider using the maven docker image directly to cleanup the Dockerfile a bit.

tagdara commented 10 months ago

I believe I initially tried, but it was using a newer or incompatible version of the JDK and was outputting errors I did not know how to resolve. I will give it another try later this weekend to see if I can track down why I went the 'hard' route.