问题
I'm using the Spotify Maven plugin to automate the building and deploying of docker images when executing certain maven goals.
However, I'm running a private unsecured registry that is accessible through the following host: server.mydomain.com:5000. However, I can't seem to stop the plugin from forcing a secure push to the repository? It uses https://server.mydomain.com:5000.
Is there any way to force the plugin to not use https?
Thanks.
Edit:
Current plugin POM configuration:
<plugin>
    <groupId>com.spotify</groupId>
    <artifactId>docker-maven-plugin</artifactId>
    <version>0.4.3</version>
    <configuration>
        <imageName>server.mydomain.com:5000/${project.artifactId}</imageName>
        <baseImage>java</baseImage>
        <entryPoint>["java", "-jar", "/${project.build.finalName}-packaged.jar"]</entryPoint>
        <resources>
            <resource>
                <targetPath>/</targetPath>
                <directory>${project.build.directory}</directory>
                <include>${project.build.finalName}-packaged.jar</include>
            </resource>
        </resources>
        <imageTags>
            <imageTag>${project.version}</imageTag>
            <imageTag>latest</imageTag>
        </imageTags>
        <retryPushCount>0</retryPushCount>
    </configuration>
    <executions>
        <execution>
            <id>build-image</id>
            <phase>package</phase>
            <goals>
                <goal>build</goal>
            </goals>
        </execution>
        <execution>
            <id>push-image</id>
            <phase>deploy</phase>
            <goals>
                <goal>push</goal>
            </goals>
        </execution>
    </executions>
</plugin>
回答1:
This seems to be Docker behavior and not related to the maven plugin you are using, see this Docker issue that mentions needing to set --insecure-registry http://server.mydomain.com:5000 when starting the Docker daemon.
来源:https://stackoverflow.com/questions/36389982/docker-maven-spotify-plugin-possible-to-switch-to-non-secure-registry