fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 644 forks source link

Unable to push docker images to Nexus using "docker-maven-plugin" #1790

Open wolverin26 opened 5 months ago

wolverin26 commented 5 months ago

Hello,

I'm trying to build docker images and push them to a Nexus Repository using maven, but unfortunately I'm getting this error "http: server gave HTTP response to HTTPS client". Even if I have added the insure registry in /etc/docker/daemon.json

docker info Insecure Registries: 192.168.206.45:5000 127.0.0.0/8 Live Restore Enabled: false

But still always having the same issue.

Btw, in another project not using maven it's working fine !! but when i use a push to the same repo using maven it's not working. It's gives me the error above.

xiaoyao9184 commented 4 months ago

Multi-platform builds use buildx, and are separate builders created by buildx create, which you can find in \target\docker\..\..\docker\buildx\instances, and buildx has its own way to set up an insecure registry.

configuring plugin

<buildx>
  <platforms>
    <platform>linux/amd64</platform>
  </platforms>
  <builderName>maven.${project.artifactId}</builderName>
  <configFile>${project.basedir}/buildkitd.toml</configFile>
</buildx>

new buildkitd.toml

[registry."hostname:5000"]
    mirrors = ["hostname:5000"]
    http = true
    insecure = true