Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support private repo #41

Merged
merged 2 commits into from Feb 11, 2020
Merged

Conversation

AkihiroSuda
Copy link
Contributor

@AkihiroSuda AkihiroSuda commented Feb 9, 2020

Description

Support private repo with the credential located as /var/lib/faasd/.docker/config.json.

Motivation and Context

#30

  • I have Alex has raised an issue to propose this change this is required

How Has This Been Tested?

Tested using a private Docker Hub repo.

$ docker tag functions/figlet:0.13.0 *******/*******:********
$ docker push *******/*******:********
$ faas-cli deploy --image=*******/*******:******** --name=figlet
$ echo hi | faas-cli invoke figlet

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Commits:

  • I've read the CONTRIBUTION guide
  • My commit message has a body and describe how this was tested and why it is required.
  • I have signed-off my commits with git commit -s for the Developer Certificate of Origin (DCO)

Code:

  • My code follows the code style of this project.
  • I have added tests to cover my changes.

Docs:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@@ -41,3 +41,7 @@
[[constraint]]
name = "github.com/openfaas/faas-provider"
version = "0.14.0"

[[constraint]]
name = "github.com/docker/cli"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I looked at the containerd resolve it seemed cleaner / more lightweight without depending on Docker itself, like this - https://github.com/containerd/containerd/blob/master/cmd/ctr/commands/resolver.go

Do you think it can be made to work without the Docker CLI?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like "github.com/containerd/containerd/remotes/docker" using NewDockerAuthorizer?

Even it (https://github.com/containerd/containerd/blob/4f348c5b5b53a70b282ab5b81b2cc8f03bf6a338/remotes/docker/authorizer.go#L90) didn't seem to use Docker itself.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't easily remove dependency on docker/cli, mostly because I believe we want to support cred helper binaries, though I think I've heard that there is an alternative go pkg for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should open docker/cli PR to reduce dependencies

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed to support the helper binaries then? Does containerd/cri not support pulling from AWS ECR then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what @ibuildthecloud did in k3c? https://github.com/rancher/k3c/blob/master/pkg/daemon/image.go

I can see a reference to docker/distribution there actually

@alexellis alexellis merged commit 4775a9a into openfaas:master Feb 11, 2020
@alexellis
Copy link
Member

Let's go for it, thank you for this PR 👍 If we find a way to remove Docker for auth later on, it can be changed again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants