paketo-community / ubi-base-stack

Apache License 2.0
2 stars 6 forks source link

skopeo copy push file to local registry failure #89

Open pacostas opened 3 months ago

pacostas commented 3 months ago

Potential issue

Currently the tests do not fail on the CI, as we use docker major version 25 but the tests probably will start to fail in the future when github actions will upgrade to docker major version 26.

Issue description

With docker version >=26.0.0 and skopeo version 1.15.1, it fails to copy-push to local registry with the below error.

Error response from daemon: {"message":"http: server gave HTTP response to HTTPS client"}

Steps to reproduce

  1. clone this repo git clone https://github.com/paketo-community/ubi-base-stack.git
  2. run ./scripts/test.sh

Steps to reproduce without using the test.sh script

  1. docker run -d -p 5000:5000 --restart=always --name registry registry:2
  2. download the build.oci image from here https://github.com/paketo-community/ubi-base-stack/releases/tag/v0.0.65 (any oci image will do)
  3. copy the image to local registry with skopeo skopeo copy oci-archive:path/to/build.oci docker://localhost:5000/build-image-test:latest --dest-tls-verify=false

you should get the below error

FATA[0000] trying to reuse blob sha256:98be1b9a299ccd651050fba79b85d091348447816285d33bc7c09d5679f69300 at destination: pinging container registry localhost:5000: Get "https://localhost:5000/v2/": http: server gave HTTP response to HTTPS client