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

sealer build fail with http schema #2345

Open
teacher2018 opened this issue Sep 7, 2024 · 0 comments · May be fixed by #2346
Open

sealer build fail with http schema #2345

teacher2018 opened this issue Sep 7, 2024 · 0 comments · May be fixed by #2346
Labels
kind/bug Something isn't working

Comments

@teacher2018
Copy link

What happen?

Kubefile

FROM registry:5000/sealerio/kubernetes:v1.22.15

When executing the build process,error output and interruption ended

$ sealer build --debug -f Kubefile -t registry:5000/my-cluster:v1.0.0 .
ERROR: ...... http: server gave HTTP response to HTTPS client

"registry", authentication private warehouse using http schema

Relevant log output?

[DEBUG] [config.go:326] Found credentials for registry:5000/sealerio/kubernetes in credential helper containers-auth.json in file /root/.docker/config.json

[DEBUG] [registries_d.go:221]  Lookaside configuration: using "default-docker" configuration

[DEBUG] [registries_d.go:176]  No signature storage configuration found for registry:5000/sealerio/kubernetes:v1.22.15, using built-in default file:///var/lib/containers/sigstore

[DEBUG] [tlsclientconfig.go:20] Looking for TLS certificates and private keys in /etc/docker/certs.d/registry:5000

[DEBUG] [registries_d.go:254]  Sigstore attachments: using "default-docker" configuration

[DEBUG] [docker_client.go:563] GET https://registry:5000/v2/

[DEBUG] [docker_client.go:751] Ping https://registry:5000/v2/ err Get "https://registry:5000/v2/": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://registry:5000/v2/", Err:(*errors.errorString)(0xc000641ef0)})

[DEBUG] [docker_client.go:563] GET https://registry:5000/v1/_ping

[DEBUG] [docker_client.go:781] Ping https://registry:5000/v1/_ping err Get "https://registry:5000/v1/_ping": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://registry:5000/v1/_ping", Err:(*errors.errorString)(0xc00007eca0)})

[DEBUG] [docker_image_src.go:91] Accessing "registry:5000/sealerio/kubernetes:v1.22.15" failed: pinging container registry registry:5000: Get "https://registry:5000/v2/": http: server gave HTTP response to HTTPS client

[DEBUG] [pull.go:628] Error pulling candidate registry:5000/sealerio/kubernetes:v1.22.15: initializing source docker://registry:5000/sealerio/kubernetes:v1.22.15: pinging container registry registry:5000: Get "https://registry:5000/v2/": http: server gave HTTP response to HTTPS client

[ERROR] [root.go:75] sealer-v0.11.0: failed to process from: failed to pull image registry:5000/sealerio/kubernetes:v1.22.15: initializing source docker://registry:5000/sealerio/kubernetes:v1.22.15: pinging container registry registry:5000: Get "https://registry:5000/v2/": http: server gave HTTP response to HTTPS client

What you expected to happen?

enable tls verify skip on kubefile.go,457

	id, err := kp.imageEngine.Pull(&options.PullOptions{
		PullPolicy:    kp.pullPolicy,
		Image:         image,
		Platform:      platform,
	})

How to reproduce it (as minimally and precisely as possible)?

a private registry only using http schema

Kubefile

FROM registry:5000/sealerio/kubernetes:v1.22.15

$ sealer build --debug -f Kubefile -t registry:5000/my-cluster:v1.0.0 .



### Anything else we need to know?

_No response_

### What is the version of Sealer you using?

{"gitVersion":"v0.11.0","gitCommit":"f07e804","buildDate":"2023-07-25 02:51:08","goVersion":"go1.17.13","compiler":"gc","platform":"linux/amd64"}

### What is your OS environment?

_No response_

### What is the Kernel version?

Linux version 3.10.0-1160.119.1.el7.x86_64

### Other environment you want to tell us?

- Cloud provider or hardware configuration:
- Install tools:
- Others:
@teacher2018 teacher2018 added the kind/bug Something isn't working label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant