Compare commits

...

10 Commits

Author SHA1 Message Date
Clemens Klug 9f0e6aa237 improve readme, add gitignore 2019-03-28 12:31:43 +01:00
Clemens Klug eea8a1a7bd Merge branch 'master' of ssh://git.wiai.de:22222/cklug/docker-update 2019-03-28 12:01:15 +01:00
Michael Traeger f98fb51252 add readme 2019-03-27 19:40:08 +01:00
FSWIAI Docker Server 3dd83d0ccf prod fixes 2019-03-27 18:48:38 +01:00
FSWIAI Docker Server 6a126590d0 Merge branch 'master' of https://git.clkl.de/agp8x/docker-update 2018-08-06 13:46:07 +02:00
FSWIAI Docker Server 04f6d73ea0 Merge branch 'master' of https://git.clkl.de/agp8x/docker-update 2018-08-06 13:20:55 +02:00
FSWIAI Docker Server 82281daf61 Merge branch 'master' of https://git.clkl.de/agp8x/docker-update 2018-08-06 13:09:17 +02:00
FSWIAI Docker Server 27b4d72ad8 Merge branch 'master' of https://git.clkl.de/agp8x/docker-update 2018-08-06 13:05:38 +02:00
FSWIAI Docker Server bcf8cd290c Merge branch 'master' of https://git.clkl.de/agp8x/docker-update 2018-08-06 12:45:26 +02:00
FSWIAI Docker Server ba15313a9e merge 2018-08-06 12:45:21 +02:00
5 changed files with 92 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
__pycache__/

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'

86
readme.md Normal file
View File

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

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)