Closed CuriousJDev closed 7 years ago
Check that the "registryUrl" in the pom.xml refers to the entry in the config.json ("
Thanks bucht. It was on same line serverId was missing from configuration element.
@CuriousJDev sorry for my ignorance, I have arrived at the same issue as you. Could you please give me an idea as to which bit is server-id once you create a repository in aws? many thanks
One thing I would recommend that really tripped me up was the version of the plugin. I was using a very old plugin version and it was giving me this error. When I changed to the current version it magiclly worked.
One thing I would recommend that really tripped me up was the version of the plugin. I was using a very old plugin version and it was giving me this error. When I changed to the current version it magiclly worked.
We successfully solved this problem through your suggestion, in version 1.2.0 problem can not be solved, so we try a lower version of 1.1.1, nice, problem be solved. here is my config
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<imageName>${docker.registry}/${project.name}:${project.version}</imageName>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<skipDockerBuild>false</skipDockerBuild>
<pushImage>true</pushImage>
<serverId>nexus</serverId>
<registryUrl>${docker.registry}</registryUrl>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
note: you should config your username and password in maven configration file
settings.xml
One thing I would recommend that really tripped me up was the version of the plugin. I was using a very old plugin version and it was giving me this error. When I changed to the current version it magiclly worked.
We successfully solved this problem through your suggestion, in version 1.2.0 problem can not be solved, so we try a lower version of 1.1.1, nice, problem be solved. here is my config
<plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>1.1.1</version> <configuration> <imageName>${docker.registry}/${project.name}:${project.version}</imageName> <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> <skipDockerBuild>false</skipDockerBuild> <pushImage>true</pushImage> <serverId>nexus</serverId> <registryUrl>${docker.registry}</registryUrl> <resources> <resource> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin>
note: you should config your username and password in maven configration file
settings.xml
Thanks, this helped me out. Switching back to 1.1.1 did the trick for me as well.
Description
I am trying to push Docker image to my nexus3 private repo for Docker which is Ubuntu over virtualBox. I have nexus running over HTTPS and When I have verified over command line using below commands then I am able to push successfully in nexus
But when trying in Jenkins using maven command
$>mvn -gs /usr/share/maven/conf/settings.xml clean -X package docker:build -DpushImage
Then I am getting below stacktrace
I have added nexus repo credential in setting.xml
also config.json has auth entry for repo
What do you expect
Expect it to push image.
What happened instead
Getting exception for no basic auth found and using
$docker images
I can see my image is built successfully.
I am not sure what am I doing?
Thanks
Software:
Full backtrace