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

Buildx don't push image on private registry #455

Closed
sminodonte opened this issue Nov 26, 2020 · 6 comments · Fixed by #787
Closed

Buildx don't push image on private registry #455

sminodonte opened this issue Nov 26, 2020 · 6 comments · Fixed by #787

Comments

@sminodonte
Copy link

sminodonte commented Nov 26, 2020

I run this command:

docker buildx build --platform linux/arm64 -t IP:_PRIVATE_REGISTRY:5000/i<IMAGE_NAME>:latest . --push

and the result was:

WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
[+] Building 5.1s (11/11) FINISHED                                                                                                                                                                                                                                                                                                                                          
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                      0.1s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                        0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                                   0.1s
 => => transferring dockerfile: 60B                                                                                                                                                                                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:10.15.3-alpine                                                                                                                                                                                                                                                                                                 2.7s
 => [1/6] FROM docker.io/library/node:10.15.3-alpine@sha256:aa28f3b6b4087b3f289bebaca8d3fb82b93137ae739aa67df3a04892d521958e                                                                                                                                                                                                                                           0.0s
 => => resolve docker.io/library/node:10.15.3-alpine@sha256:aa28f3b6b4087b3f289bebaca8d3fb82b93137ae739aa67df3a04892d521958e                                                                                                                                                                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                                                                      1.9s
 => => transferring context: 1.01MB                                                                                                                                                                                                                                                                                                                                    1.8s
 => CACHED [2/6] WORKDIR /app                                                                                                                                                                                                                                                                                                                                          0.0s
 => CACHED [3/6] COPY package*.json ./                                                                                                                                                                                                                                                                                                                                 0.0s
 => CACHED [4/6] RUN apk add --no-cache make gcc g++ python zeromq-dev                                                                                                                                                                                                                                                                                                 0.0s
 => CACHED [5/6] COPY . .                                                                                                                                                                                                                                                                                                                                              0.0s
 => CACHED [6/6] RUN npm install                                                                                                                                                                                                                                                                                                                                       0.0s
 => ERROR exporting to image                                                                                                                                                                                                                                                                                                                                           0.4s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                0.0s
 => => exporting manifest sha256:fbce2f56011231f6a35ab2f1dfaf83093baa1918e07d530f936d1f8d1ce20084                                                                                                                                                                                                                                                                      0.0s
 => => exporting config sha256:37b419b018a80f04f32ee33f57f15074c4bdb99f8a8ad5f9eabbbda37a493f4c                                                                                                                                                                                                                                                                        0.0s
 => => pushing layers                                                                                                                                                                                                                                                                                                                                                  0.2s
------
 > exporting to image:
------
failed to solve: rpc error: code = Unknown desc = failed to do request: Head https://...:5000/v2/IMAGENAME/blobs/sha256:0a8c0ec809414c3d3275b692e6043f70528adc63acc2592f1abdb9879edf1709: x509: certificate has expired or is not yet valid

I never had a problem with my private registry about the certificate and I always pushed the image without any problem.
It happened with make a build with buildx

do you have any idea?
Thanks

@sminodonte sminodonte changed the title Don't push image on private registry Buildx don't push image on private registry Nov 27, 2020
@errordeveloper
Copy link
Contributor

You probably used insecure-registries setting in dockerd, I assume there should be an equivalent in buildkit.

@VladoPortos
Copy link

@sminodonte did you ever get this sorted ? I have the same issue.. buildx is going directly to DNS and ignore settings in /etc/hosts, one workaround is to specify DNS servers in dockers setting to point to your own and setup A entry for the local registry... which is not a great solution... docker push does not have this issue.

@errordeveloper
Copy link
Contributor

errordeveloper commented Feb 4, 2021 via email

@VladoPortos
Copy link

@errordeveloper already sorted, by exactly as you say customizing the build image, I put the steps at the bottom of my web guide for further reference: https://rpi4cluster.com/k3s/k3s-docker-install/ solution by #80 (comment)

@sminodonte
Copy link
Author

@VladoPortos never sorted...but now I'll try it, thanks

@errordeveloper thanks for your solution

@nevergone
Copy link

Please resolve this issue.

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

Successfully merging a pull request may close this issue.

4 participants