Merge branch 'master' of ssh://git.wiai.de:22222/cklug/docker-update

master
Clemens Klug 2019-03-28 12:01:15 +01:00
commit eea8a1a7bd
4 changed files with 63 additions and 5 deletions

View File

@ -4,6 +4,6 @@ services:
image: docker.clkl.de/docker/update:0.1_alpine
build: .
volumes:
- ./docker-compose.py:/docker-compose.py
- ./sample:/services
command: bash -c 'python3 /docker_compose.py /services/*'
- /opt/docker/services:/services
- ./:/out/
command: bash -c 'python3 /out/show_updateable.py -s -o /out/updates.json /services/* --ignore zammad'

View File

@ -142,4 +142,4 @@ if __name__ == "__main__":
with open(args.output, "w") as out:
json.dump(overview, out, indent=1, sort_keys=True)
else:
print(json.dumps(overview, indent=1))
print(json.dumps(overview, indent=1))

58
readme.md Normal file
View File

@ -0,0 +1,58 @@
Docker Update
=============
Try to show updates for your used docker images.
Requirements
------------
TODO
You need a directory containing your service directories. These services must have a docker-compose.yml to get checked.
Example:
```
└── services
├── bitpoll.wiai.de
│   ├── docker
│   ├── docker-compose.yml
├── dockerui
│   ├── docker-compose.yml
└── zitate
└── docker-compose.yml
```
If there are files or directories without a docker-compse.yml, it will just notify you and ignore it.
Usage
----
Modify mount of services directory. Mount your directory as `/services`.
```
docker-compose up
```
Output file: `updates.json`
Advantages
----------
* No access to Docker-Socket
* tbc ...
Alternatives
------------
* https://github.com/v2tec/watchtower
* https://engineering.salesforce.com/open-sourcing-dockerfile-image-update-6400121c1a
* https://stackoverflow.com/questions/26423515/how-to-automatically-update-your-docker-containers-if-base-images-are-updated
* tbc ...

View File

@ -52,5 +52,5 @@ def main(args):
if __name__=="__main__":
parser = docker_compose.args_setup("Show updates for docker-compose style services")
args = parser.parse_args()
print(args)
main(args)