Giter Site home page Giter Site logo

Support sending registry auth about jaas HOT 9 CLOSED

alexellis avatar alexellis commented on May 19, 2024
Support sending registry auth

from jaas.

Comments (9)

alexellis avatar alexellis commented on May 19, 2024 1

There is the additional flag in the CLI now -registryAuth=. If you want to parse your file with jq and pass it to the CLI that's fine, it would also work. MacOS doesn't use this file anymore but the keychain.

Let me know how you get on with the fix. I'll close the issue for now since there is a way to do this.

from jaas.

alexellis avatar alexellis commented on May 19, 2024

Thanks for taking an interest in my JaaS project, you might also like Functions as a Service which is much more complete for running ad-hoc functions on Docker Swarm.

So regarding JaaS - since you can't login interactively through cron, you would need to provide the encoded registry token to the CLI. Here's an example for a new flag I can add -registryAuth:

$ echo admin:admin | base64
YWRtaW46YWRtaW4K
$ jaas -registryAuth=YWRtaW46YWRtaW4K -etc -etc

Does that work for you?

from jaas.

byrnedo avatar byrnedo commented on May 19, 2024

Your Faas project looks really interesting, I'll have to set aside some time to read through the setup!

That sounds good if it's that simple. I had a look at the docker client, I guess it's maybe a customer header when you make the client?

from jaas.

alexellis avatar alexellis commented on May 19, 2024

So do you have a password protecting pulls or just push? Is this registry:2 or the Docker Hub you mean by "private"?

from jaas.

byrnedo avatar byrnedo commented on May 19, 2024

registry:2 self-hosted, protecting both.

from jaas.

alexellis avatar alexellis commented on May 19, 2024

It'll be something more like this then via docs:

$ jaas -image=myregistrydomain.com:5000/pinger -rm -showlogs=true --registryAuth=$(echo '{"username": "admin", "password": "admin"}'|base64)

You may just want to store the result of $(echo '{"username": "admin", "password": "admin"}'|base64 into a file.

Try pulling from master and re-building.

from jaas.

byrnedo avatar byrnedo commented on May 19, 2024

from jaas.

byrnedo avatar byrnedo commented on May 19, 2024

Actually, I think it's just a header with user:pass, basic auth. My local .docker/config.json has the following for instance:

{
	"auths": {
		"https://index.docker.io/v1/": {
			"auth": "DUMMYBASE64="
		},
		"registry.acme.se": {
			"auth": "DUMMYBASE64="
		}
	}
}

Where registry.acme.se is v2.

EDIT: Ah ok, I see that one can actually login with v2 api: https://success.docker.com/Cloud/Solve/How_do_I_authenticate_with_the_V2_API%3F

from jaas.

byrnedo avatar byrnedo commented on May 19, 2024

Thanks very much, @alexellis!

from jaas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.