-
Notifications
You must be signed in to change notification settings - Fork 640
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
I cannot docker:push #151
Comments
in wireshark seems that your http post request doesn't follow redirects?
|
In your ApacheHttpDelegate.java:87 add this: builder.setRedirectStrategy(new LaxRedirectStrategy()); and should do the trick :) |
Still that doesn't work.... |
Sounds a little bit like the issue described here. I will try to apply the solution over there and let's see whether it works (although I really don't understand the purpose of the redirect, especially because the URL used for the registry (http://localhost:5000) has been mangled (to http:/localhost:5000). 'wonder whether it would help to do replace the double slash to a single slash within the plugin before so that a redirect could be avoided alltogether. Might be even a more straight forward solution. |
thanks rhuss! |
Even using a proper https docker registry I can see that it only talks to the local docker (latest version btw), here are the logs from docker:push goal:
still the https:// gets https:/ |
even if I docker:remove and then docker:push still the same... |
for my private https registry the problem was that I was prefixing https:// in the global registry tab of the plugin configl when i removed that https and put only the port it worked !!! so either using my registry in the name or in the registry global conf with the pattern host:port it works without a problem.... example: <plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.11.3</version>
<configuration>
<dockerHost>tcp://0.0.0.0:2375</dockerHost>
<useColor>true</useColor>
<verbose>true</verbose>
<registry>registry.jufis.net:443</registry>
<authConfig>
<username></username>
<password></password>
</authConfig>
<images>
<image>
<alias>dockerServer</alias>
<!-- if there is no . or : before / like here there is no registry
defined, so registry tag in use now -->
<name>jufis/docker-rest-server:${git.buildnumber}</name>
<build>
<from>dockerfile/java:oracle-java7</from>
<maintainer>jufis@jufis.net</maintainer>
<tags>
<tag>${git.buildnumber}</tag>
</tags> |
well the catch was to have an empty authentication token !!! my https registry is not using any basic auth at all but it seems that i need this !!! |
There are two main points I see here:
BTW, the plugin never talks directly with a registry. It always goes over the Docker host, which in turn will push the image to the registry. So it is naturally that you never will see any communication to the registry in the debug output. (I cleaned up a bit your debugging output for better readability. 'hope you don't mind ...) |
AFAIS one shouldn't specify the scheme when referring to a registry. The docker host will find out the scheme (http/https) on its own. So I suggest to use |
Please let me know, whether this works for you (if you tried that). If so, I would like to close this issue. |
Hello Roland, Thank you for your great support. Yes I have tried that (without a scheme + empty auth) and it works and I can now push to the private ssl registry without a problem. Please close the ticket. I appreciate for your valuable support on this matter. I guess you can make a research for the 2 points you mentioned above in another ticket/scope without this being open. Cheers, |
No problem, you are always welcome ;-) |
when ADDing files, write dest as a directory
Here is my config:
I have started a docker registry with:
I can verify that it listens to 5000 with: netstat -an |grep 5000
My docker deamon listens on localhost:2375 and I can list my images without a problem.
My docker daemon can push without a problem to the local registry.
Here is what I get from -X
The text was updated successfully, but these errors were encountered: