Compare commits

..

No commits in common. "9f0e6aa237cfd65a3d9ce087451379844e5e0acd" and "0fbdcf1a6630c18c76abdfada11a4472084484c0" have entirely different histories.

5 changed files with 5 additions and 92 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
__pycache__/

View File

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

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))

View File

@ -1,86 +0,0 @@
Docker Update
=============
Try to show updates for your used docker images.
Requirements
------------
* Docker
* docker-compose
* Libraries: requirements.txt (`pip3 install -r requirements.txt` or docker ;))
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.
If the compose file contains a build-section, the Dockerfile is inspected, too.
Usage
----
### Docker
Modify mount of services directory. Mount your directory as `/services`.
```
docker-compose up
```
Output file: `updates.json`
### Command line
```
$ python3 show_updateable.py -h
usage: show_updateable.py [-h] [--output OUTPUT]
[--ignore IGNORE [IGNORE ...]] [--match-suffix]
compose_files [compose_files ...]
```
* output: json file for results
* ignore: ignore services (ignore is substring of service path)
* match-suffix: use only same suffixes in image labels (e.g. only -alpine images)
* compose files: service directories: see #example (multiple paths allowed)
Advantages
----------
* No access to Docker-Socket
* No deamon
* No state
* Detect new major versions
* Report only, no uncontrolled automated actions
* tbc ...
Alternatives
------------
* https://github.com/v2tec/watchtower (seems quite dead, look for forks)
* https://github.com/pyouroboros/ouroboros
* 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 ...
Known Issues
------------
* Still WiP/PoC
* http/https sources are not implemented yet
* some images have … weird tags
* pull requests welcome

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)