Skip to content

Validate read access fails publish to local registry #1578

@joebowbeer

Description

@joebowbeer

Summary

pack build --publish fails to publish to a local registry even though docker push would succeed.

The local registry was created by:

kn quickstart kind --registry

The ko tool is able to publish:

ko build main.go -B

But pack fails:

[analyzer] ERROR: failed to initialize analyzer: validating registry read access:
failed to ensure registry read access to localhost:5001/npm-sample:
Get "https://localhost:5001/v2/": dial tcp [::1]:5001: connect: connection refused;
Get "http://localhost:5001/v2/": dial tcp [::1]:5001: connect: connection refused

Reproduction

Steps
  1. Create kind cluster and local registry using knative quickstart
  2. Try to build and publish the npm-sample

I expect this command to succeed:

pack build localhost:5001/npm-sample \
	--buildpack docker.io/paketobuildpacks/nodejs \
	--builder docker.io/paketobuildpacks/builder-jammy-buildpackless-base \
	--publish

But it fails:

[analyzer] ERROR: failed to initialize analyzer: validating registry read access:
failed to ensure registry read access to localhost:5001/npm-sample:
Get "https://localhost:5001/v2/": dial tcp [::1]:5001: connect: connection refused;
Get "http://localhost:5001/v2/": dial tcp [::1]:5001: connect: connection refused

However, the docker publish as a second step succeeds:

pack build localhost:5001/npm-sample \
	--buildpack docker.io/paketobuildpacks/nodejs \
	--builder docker.io/paketobuildpacks/builder-jammy-buildpackless-base \
docker push localhost:5001/npm-sample

Context

lifecycle version
Created By:
  Name: Pack CLI
  Version: 0.39.1+git-dc9220d.build-6702

Trusted: No

Stack:
  ID: io.buildpacks.stacks.jammy

Lifecycle:
  Version: 0.21.0
  Buildpack APIs:
    Deprecated: (none)
    Supported: 0.7, 0.8, 0.9, 0.10, 0.11, 0.12
  Platform APIs:
    Deprecated: (none)
    Supported: 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15
platform version(s)
Pack:
  Version:  0.39.1+git-dc9220d.build-6702
  OS/Arch:  linux/amd64

Default Lifecycle Version:  0.20.19

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13

Config:
(no config file found at /home/vscode/.pack/config.toml)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions