The <registry> element is not honored when pulling.
Here is a part of my config:
<configuration>
<autoPull>true</autoPull>
<images>
<image>
<alias>csl-entities-csa</alias>
<name>collab/collab-shared-library:X.1.0</name>
<registry>${collab.docker.registry}</registry>
This fails with:
[INFO] --- docker-maven-plugin:0.24.0:run (buildImage) @ csa-application ---
[ERROR] DOCKER> Error occurred during container startup, shutting down...
[ERROR] DOCKER> I/O Error [Unable to pull 'collab/collab-shared-library:X.1.0' : pull access denied for collab/collab-shared-library, repository does not exist or may require 'docker login' (Not Found: 404)]
However this works:
<alias>csl-entities-csa</alias>
<name>${collab.docker.registry}/collab/collab-shared-library:X.1.0</name>
<!--<registry>${collab.docker.registry}</registry>-->
The documentation sounds the <registry> should automatically be added to the image name when building, pulling or pushing. Which is a great idea. But if it's not the case, then the documentation should more clear.
mvn -v) : 3.5.0Maven home: /sw/prog/maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /sw/prog/jdk/1.8.0_144/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.13.0-37-generic", arch: "amd64", family: "unix"
<registry> element as per the DMP documentation.You are right, <registry> in an <image> config is only used for pushing right now, not for pulling (which actually would make sense indeed for symmetry reason). So we should fix that.
In the meantim you could also use global <pushRegistry> and <pullRegistry> directly on the plugin configuration, if this fits your bill. Or put it directly on the image name, which actually does the same.
Thanks! I didn't actually verify try push because I didn't get to it, so I assumed symmetry as you mention.
I can't use global <pullRegistry> because I pull from 3 repos. Having this fixed would be great.