Browse Source

Add authentication for the docker registry

master
meskio 3 years ago
parent
commit
e50c9676c1
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 8
      README.md
  2. 7
      docker-config.json
  3. 8
      playbook.yml
  4. 1
      vars.yml

8
README.md

@ -4,3 +4,11 @@ It will configure a webhook to listen in:
http://ip:9000/hooks/build\_image
The gitea of your organization should be configured to ping this url with {{ secret }} on each push event.
vars
----
registry\_aut is the base64 of the registry auth credentials:
```
echo -n 'username:password' | base64
```

7
docker-config.json

@ -0,0 +1,7 @@
{
"auths": {
"{{ registry }}": {
"auth": "{{ registry_auth }}"
}
}
}

8
playbook.yml

@ -43,6 +43,14 @@
- docker.io
state: latest
- name: docker config
template:
src: docker-config.json
dest: "{{ laminar_home }}/.docker/config.json"
owner: laminar
group: laminar
mode: u=rwx
- name: install laminar
apt:
# laminar is in it's way to get included in debian:

1
vars.yml

@ -2,3 +2,4 @@
secret: "secret"
repos_url: "https://git.sindominio.net/estibadores"
registry: "localhost:5000"
registry_auth: "dXNlcjpwYXNz"

Loading…
Cancel
Save