Skip to content

Commit

Permalink
Move to path.Join for repo + image_name:
Browse files Browse the repository at this point in the history
With this a tink-worker can be started without
a registry defined and templates in Tink server
can specify any registry.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Apr 14, 2022
1 parent 453f0fd commit 21a4978
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/tink-worker/worker/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/json"
"io"
"path"

"github.com/docker/docker/api/types"
"github.com/pkg/errors"
Expand Down Expand Up @@ -42,7 +43,7 @@ func (m *containerManager) PullImage(ctx context.Context, image string) error {
}
authStr := base64.URLEncoding.EncodeToString(encodedJSON)

out, err := m.cli.ImagePull(ctx, m.registryDetails.Registry+"/"+image, types.ImagePullOptions{RegistryAuth: authStr})
out, err := m.cli.ImagePull(ctx, path.Join(m.registryDetails.Registry, image), types.ImagePullOptions{RegistryAuth: authStr})
if err != nil {
return errors.Wrap(err, "DOCKER PULL")
}
Expand Down

0 comments on commit 21a4978

Please sign in to comment.