Hi, I'm trying to use the service binding but it is failling to resolve to the alias
Here the code snippet in go sdk
registry := client.Container().From("registry:2").WithExec(nil).WithExposedPort(5000)
_, err = client.Container().
From("alpine").
WithServiceBinding("registry", registry).
WithExec([]string{"apk", "add", "bind-tools"}).
WithExec([]string{"ping", "registry"}).
Stdout(ctx)
// Publish
ref, err := client.Container().
From("alpine").
WithFile("/bin/", bin).
WithServiceBinding("registry", registry).
Publish(ctx, "registry:5000/dagger-demo")
if err != nil {
return err
}
log.Info(ref)
The result :
process \"ping registry\" did not complete successfully: exit code: 1\nStdout:\n\nStderr:\nping: bad address 'registry'
I also reproduce this on playground. https://play.dagger.cloud/playground/r_k0Z9mT_kU
What am i missing ?
Thanks
Welcome to Dagger API Playground