You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the plugin will not use the provided url and fails with
> Task :myDockerPush FAILED
Pushing image 'test/test:0.1.0 to https://index.docker.io/v1/.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myDockerPush'.
> Could not push image: denied: requested access to the resource is denied
If you are dealing with just a single registry then you do not need to use registryCredentials for tasks. Simply define it centrally in the docker extension. It will be applied to all Docker tasks. Something seems to be off as you are still pushing to Docker Hub. Make sure to provide the credentials.
I am having a similar problem on Gradle 8,6 when trying to push an image, in that I am unable to set the the registry to anything other than dockerhub.
I have configured the docker closure as follows;
docker {
registryCredentials {
url.set("https://ghcr.io")
username.set(System.getenv("MY_GPR_USERNAME") as String)
password.set(System.getenv("MY_GPR_TOKEN") as String)
}
}
when I try to use the dockerPushImage task it returns the following;
When running
dockerPushImage
or a custom task such asthe plugin will not use the provided url and fails with
Expected Behavior
it should use the provided url
Current Behavior
its using the default url
Context
gradle 8.2.1
all 3 print statements print;
https://123.dkr.ecr.us-east-1.amazonaws.com/repository
however, it still uses the default configuration
Dockerfile
andDockerBuildImage
tasks work fine in the same buildive also tried
and
The text was updated successfully, but these errors were encountered: