Skip to content
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

When using buildx getting "Head "https://gitlab..../manifests/latest": dial tcp ...:5050: connect: connection refused" #1841

Open
oktayderman opened this issue Dec 6, 2024 · 1 comment

Comments

@oktayderman
Copy link

oktayderman commented Dec 6, 2024

When running docker:build goal I am getting error below for our private registry.
We are using baseImage from our private registry in DockerFile
FROM gitlab....:5050/v2/i2i/ocs/fizz/fizz-source/base-image-17-jre/:latest

--Head "https://gitlab....:5050/v2/i2i/ocs/fizz/fizz-source/base-image-17-jre/manifests/latest": dial tcp 195.214.161.37:5050: connect: connection refused--

it works when not using buildx.

goal executing this command:
docker --config /myData/dev/projects/fizz-source/AOM/aom-parent/aomif/target/docker/aomif-maven/docker buildx build --progress=plain --platform linux/amd64 --tag aomif-maven:latest --tag aomif-maven:latest --tag aomif-maven:20.0-SNAPSHOT --file=/myData/dev/projects/fizz-source/AOM/aom-parent/aomif/target/docker/aomif-maven/tmp/docker-build/Dockerfile /myData/dev/projects/fizz-source/AOM/aom-parent/aomif/target/docker/aomif-maven/tmp/docker-build --load

if I remove --builder maven or both --config ... --builder maven of from command and run it manually from terminal. it is working.
What should I do for this error in configuration or is it a bug ?

Seems at these link guys had the same problem
#1583
#1673

I am using buildOptions with version=2 to overcome the issue to use buildkit without buildx configuration.

<image> <name>${project.artifactId}-maven</name> <alias>${project.artifactId}</alias> <build> <buildOptions> <version>2</version><!-- enable buildkit--> </buildOptions>

@oktayderman
Copy link
Author

oktayderman commented Dec 8, 2024

I have resolved the problem by the reference of this issue: docker/buildx#2239
I added following config to buildx configuration, this option applies at docker builder create step. I am surprised at default we cannot use host network and fabric8 creating it own builder always.

 <buildx>
<driverOpts>
    <network>host</network>
</driverOpts>
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant