Closed steffsommer closed 1 year ago
It turned out that my configuration was wrong. I assumed that the Registry URL would be prepended to the Image name, but that is not the case. So I just hat to update my image name to include the URL of the repository.
So I changed
tasks.register<DockerBuildImage>("build-docker-image") {
inputDir = file("dist")
dependsOn(createDockerFile, assembleWebProd)
images.add("cardiary-web-test:main")
}
to this:
tasks.register<DockerBuildImage>("build-docker-image") {
inputDir = file("dist")
dependsOn(createDockerFile, assembleWebProd)
images.add("nexus.my-company.com:9004/cardiary-web-test:main")
}
I will leave the issue up. Potentially it provide a benefit to extend the push-examples in the documentation to include a build image task, so that users can observe the correct naming convention.
Thank you for providing this plugin!
Yes, it's standard convention in Docker to refer to the container image by repository (if you are not pulling from Docker Hub). I am going to close the issue. We do have an example for Harbor in the functional tests but not in the documentation I think.
I want to push a docker image to a privately hosted Nexus repository using solely the Docker Remote API, because it is not a Java project. I tried configuring the registry credentials + url in the global
docker
object as well as inside theDockerPushImage
task, but my docker push task always attempts to push to the default registry https://index.docker.io/v1/. I think I followed the docs correctly, this is my configuration:Expected Behavior
I expected the image to be pushed to
https://nexus.my-company.com:9004
Current Behavior
The plugin attempts to push the image to
https://index.docker.io/v1/
Context
Steps to Reproduce (for bugs)
Your Environment
OS: Windows 10 Gradle --version: 8.2.1 gradle-docker-plugin-version: Reproducible in 9.3.2 and 9.1.0