Automatically update Docker services and containers with new image from Gitlab image registry.
319
Polls Gitlab image registry for updates for images listed in config.json and updates containers and services using these images. Developed for Ubuntu 18.04, other distributions or operating systems not tested.
{
"config": {
"interval": <interval-seconds>,
"login": "<gitlab-login>",
"password": "<gitlab-password>"
},
"registries": [
{
"user": "<user-name>",
"project": "<project-name>",
"apiToken": "<api-token>",
"images": [
{
"tag": "<tag>"
}
]
},
{
"user": "<user-name>",
"project": "<project-name>",
"apiToken": "<api-token>",
"images": [
{
"tag": "<tag>"
},
{
"tag": "<tag2>"
}
]
}
]
}
version: '3.2'
services:
gitlab-image-refresher:
image: gitlab-image:refresher:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- <path-to-config.json>:/app/config.json
- <path-to-cache.json>:/app/cache.json
- <path-to-log.txt>:/app/cache.json
1 To generate Gitlab private API token see: https://gitlab.com/profile/personal_access_tokens
Gitlab Image Refresher requires api rights to work.
2cache.json and log.txt are optional for perseverance, use touch to create empty file.
Content type
Image
Digest
Size
349.3 MB
Last updated
about 7 years ago
docker pull esv7/gitlab-image-refresher