diff --git a/docker-compose.yml b/docker-compose.yml index b93feaa..1924db8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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/*' \ No newline at end of file + - /opt/docker/services:/services + - ./:/out/ + command: bash -c 'python3 /out/show_updateable.py -s -o /out/updates.json /services/* --ignore zammad' diff --git a/docker_compose.py b/docker_compose.py index 1fab5c6..0afcf8c 100644 --- a/docker_compose.py +++ b/docker_compose.py @@ -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)) \ No newline at end of file + print(json.dumps(overview, indent=1)) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..297536b --- /dev/null +++ b/readme.md @@ -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 ... + + + diff --git a/show_updateable.py b/show_updateable.py index 7a9e0f6..e4a0ff9 100644 --- a/show_updateable.py +++ b/show_updateable.py @@ -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) - \ No newline at end of file