Hi Folks
func (it *PfTools) Publish(
ctx context.Context,
registry *dagger.Service,
) (string, error) {
addr, err := registry.Endpoint(ctx)
if err != nil {
return "", err
}
prodImage := dag.Container().
From("alpine").
// WithServiceBinding("registry", registry).
WithExec([]string{"apk", "add", "curl"})
_ = prodImage
// publish to ttl.sh registry
pubaddr, err := prodImage.Publish(ctx, fmt.Sprintf("http://%s/app/tools:latest", addr))
if err != nil {
return "", err
}
return pubaddr, nil
}
dagger call publish --registry=tcp://localhost:5000
error:
Stdout:
invoke: input: container.from.withExec.publish resolve: failed to export: failed to push http://ss98c1kcd4ctg:5000/app/tools:latest: invalid reference format
above is my function and how i am calling it. i have a registry2 container running in docker compose outside of dagger. i am trying to push images to this registry
when i remove the http prefix from the address this is what i get
invoke: input: container.from.withExec.publish resolve: failed to export: failed to push ss98c1kcd4ctg:5000/app/tools:latest: failed to do request: Head "https://ss98c1kcd4ctg:5000/v2/app/tools/blobs/sha256:ee4ed94bf39fc6fd0f447de438e6c6b2eea8ea0eb840fa4a790bea9e448ddaf0": dial tcp: lookup ss98c1kcd4ctg on 10.87.0.1:53: no such host