Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using GradleInspector with gradle.properties in ORT docker image #9756

Open
thomasscheer opened this issue Jan 15, 2025 · 0 comments
Open

Using GradleInspector with gradle.properties in ORT docker image #9756

thomasscheer opened this issue Jan 15, 2025 · 0 comments
Labels
docker About Docker topics enhancement Issues that are considered to be enhancements

Comments

@thomasscheer
Copy link

What is the existing functionality and how should it be enhanced?

add

Ensure that the ORT data directory exists to be able to mount the config into it with correct permissions.

RUN mkdir -p "$HOME/.ort" "$HOME/.gradle"

in line 598 of Dockerfile

What is the use-case for your enhancement?

I want to use the existing ort docker image from ghcr.io/oss-review-toolkit/ort with gradle / gradleInspector package manager using an own gradle.properties file

Mounting the gradle.properties file during docker run with -v ~/gradle.properties:/home/ort/.gradle/gradle.properties will make ROOT the owner /home/ort/.gradle (e.g. using DOCKER DESKTOP / DOCKER CE on Windows)

Alternatives you have considered

Docker CE on Linux works fine, Docker on Windows with gradle is not working when gradle.properites must be mounted to container.

ERROR when using the current ort image

10:27:12.211 [DefaultDispatcher-worker-1] ERROR org.ossreviewtoolkit.analyzer.PackageManager - GradleInspector failed to resolve dependencies for path 'settings.gradle': GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-8.10.2-bin.zip'.
Caused by: RuntimeException: Could not create parent directory for lock file /home/ort/.gradle/wrapper/dists/gradle-8.10.2-bin/a04bxjujx95o3nb99gddekhwo/gradle-8.10.2-bin.zip.lck

@thomasscheer thomasscheer added enhancement Issues that are considered to be enhancements to triage Issues that need triaging labels Jan 15, 2025
@sschuberth sschuberth added docker About Docker topics and removed to triage Issues that need triaging labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker About Docker topics enhancement Issues that are considered to be enhancements
Projects
None yet
Development

No branches or pull requests

2 participants