Closed XhstormR closed 1 year ago
Yea, I had this problem during testing, but I thought I fixed it.
What's strange is when I build the image locally, it works, but using the image that the Docker Library Jenkins built, it doesn't 🤔
Ah, they're different contents.
$ docker run --rm -u gradle myLocalGradleImage ls -la .gradle
total 8
drwxr-xr-x 2 root root 4096 Aug 15 23:20 .
drwxr-x--- 1 gradle gradle 4096 Aug 15 23:22 ..
$ docker run --rm -u gradle gradle:17-graal ls -la .gradle
total 20
drwxr-xr-x 4 gradle gradle 4096 Aug 16 14:04 .
drwxr-x--- 1 gradle gradle 4096 Aug 16 13:47 ..
drwxr-xr-x 4 gradle gradle 4096 Aug 16 14:04 native
and that directory is a volume, that's why.
Official images PR: https://github.com/docker-library/official-images/pull/15214
Weird, still get this issues after pull latest graal images.
❯ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gradle graal e5e4eed24da7 12 hours ago 1.14GB
Weird, still get this issues after pull latest graal images.
❯ docker images REPOSITORY TAG IMAGE ID CREATED SIZE gradle graal e5e4eed24da7 12 hours ago 1.14GB
Maybe make sure you're not using a cached image? docker run --rm gradle@sha256:48d1da617a3647cf58dc7e9d2e8bacf8815fac838133680d3014dd01f2696671 gradle --version
is what I got from docker pull gradle:graal
. https://hub.docker.com/layers/library/gradle/graal/images/sha256-333cbc28fc9ad3413ebb120e04124b533cab8175af643ede3c83614f7d6023d6?context=explore is the sha Docker Hub shows is the latest (docker run --rm gradle@sha256:333cbc28fc9ad3413ebb120e04124b533cab8175af643ede3c83614f7d6023d6 gradle --version
). They both work for me.
My tests were done with amd64 images. Docker version 24.0.5 on Docker Desktop 4.22.0.
When I use the default root user, I can run gradle normally, but when I switch to the gradle user, the program fails to run.
You can see that the permissions of the
/home/gradle/.gradle
folder belong to root, and the gradle user has no permissions.The default latest image works fine.