Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Maven Spotify plugin - Possible to switch to non-secure registry

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>
like image 242
Ricky Davis Avatar asked Apr 03 '16 19:04

Ricky Davis


1 Answers

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.

like image 65
matt b Avatar answered Nov 13 '22 23:11

matt b