docker_auth
docker_auth copied to clipboard
How to configure registry for Github token auth
I'm unsure how to configure my registry container to use GitHub as my method for token authentication. I've set up an OAuth application on GitHub, but unsure of the correct settings to use when firing up my registry container.
I've tried something similar to the following (replacing fake values with real ones) but I'm unable to get it working correctly.
Registry container config:
version: 0.1
auth:
token:
realm: https://github.com/login/oauth/access_token
service: https://url-to-my-registry-ui.com
issuer: https://github.com
rootcertbundle: /path/to/wildcart/cert/for/my/domain
# snipped rest of file
Config for docker_auth:
server:
addr: ":5001"
certificate: "/path/to/wildcart/cert/for/my/domain"
key: "/path/to/wildcart/key/for/my/domain"
token:
issuer: "https://github.com"
expiration: 900
github_auth:
organization: "My Organization on GitHub"
client_id: "my-oauth-app-client-id"
client_secret_file: "/path/to/oauth/app/secret/file"
token_db: /data/tokens.db
acl:
- match: {team: "Engineering"}
actions: ["*"]
comment: "Engineering team members have full access"