diff --git a/README.md b/README.md index 9bc647f..ef63c69 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,10 @@ A collection of delicious docker recipes. - [x] webhook - [x] webkit :beetle: +## Utility + +- [x] registry-cli + ## Media - [x] aircast-arm :musical_note: diff --git a/registry-cli/Dockerfile b/registry-cli/Dockerfile new file mode 100644 index 0000000..cec0364 --- /dev/null +++ b/registry-cli/Dockerfile @@ -0,0 +1,21 @@ +# +# Dockerfile for registry-cli +# + +FROM python:3-slim-bullseye AS build +WORKDIR /app +ADD https://github.com/andrey-pohilko/registry-cli/raw/master/registry.py . +ADD https://github.com/andrey-pohilko/registry-cli/raw/master/requirements-ci.txt . +RUN set -xe \ + && apt update \ + && apt install -y binutils \ + && pip install --no-cache-dir pyinstaller \ + && pip install --no-cache-dir -r requirements-ci.txt \ + && pyinstaller --onefile --name=registry-cli registry.py \ + && rm -rf /var/lib/apt/lists/* + +FROM debian:bullseye +MAINTAINER EasyPi Software Foundation +COPY --from=build /app/dist/registry-cli /usr/local/bin/ +ENTRYPOINT ["registry-cli"] +CMD ["--help"] diff --git a/registry-cli/README.md b/registry-cli/README.md new file mode 100644 index 0000000..3b9618a --- /dev/null +++ b/registry-cli/README.md @@ -0,0 +1,11 @@ +registry-cli +============ + +[registry-cli][1] is a script for easy manipulation of docker-registry from command line (and from scripts) + +``` +$ alias registry-cli='docker run --rm --net host vimagick/registry-cli -r http://127.0.0.1:5000 -l user:pass' +$ registry-cli -i image_name --delete-by-hours $((24*30)) --dry-run +``` + +[1]: https://github.com/andrey-pohilko/registry-cli