Compare commits
10 Commits
0fbdcf1a66
...
9f0e6aa237
| Author | SHA1 | Date |
|---|---|---|
|
|
9f0e6aa237 | |
|
|
eea8a1a7bd | |
|
|
f98fb51252 | |
|
|
3dd83d0ccf | |
|
|
6a126590d0 | |
|
|
04f6d73ea0 | |
|
|
82281daf61 | |
|
|
27b4d72ad8 | |
|
|
bcf8cd290c | |
|
|
ba15313a9e |
|
|
@ -0,0 +1 @@
|
|||
__pycache__/
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
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
|
||||
|
|
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue