• Stars
    star
    196
  • Rank 198,553 (Top 4 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker registry cli tool, primarily for deleting images.

Docker Registry Tool

Small bash script to do repetitive things with docker registry > 2.1 ( I think, whichever version supports delete by manifest)

Dependencies

Jq

Usage: 

    ./docker_reg_tool REGISTRY_BASE_URL ACTION [OPTIONS..]
    
    Actions:

    - list               list repos

    - list REPO          list tags for repo

    - delete REPO TAG    delete tag for repo

    Example:

    List all repos
        /$ ./docker_reg_tool https://registry.my.domain list

    List tags for one repo
        /$ ./docker_reg_tool https://registry.my.domain list some-repo

    Delete tag for a repo
        /$ ./docker_reg_tool https://registry.my.domain delete some-repo some-tag

If you want something more fully featured then check out crane.

Credentials

...are sniffed out of ~/.docker/config.json. So you need to do docker login... before you can use this tool.

They can also be set with the BASIC_AUTH environment variable.

BASIC_AUTH=user:pass ./docker_reg_tool ...

Only been tested on Basic auth.

Insecure Registry

Set the INSECURE_REGISTRY to true;

INSECURE_REGISTRY=true ./docker_reg_tool ...

Registry Settings

In order for this to work, the registry needs to be running with If docker image:

REGISTRY_STORAGE_DELETE_ENABLED="true"

Or in the config file:

storage:
  delete:
    enabled: true

Also, the size will not decrease until the garbage collector runs. You can trigger it manually with:

docker exec registry bin/registry garbage-collect -m=true /etc/docker/registry/config.yml

Debugging

Set the TRACE environment variable to true to turn on set -x

TRACE=true ./docker_reg_tool ...

Docker Image

See https://hub.docker.com/r/byrnedo/reg-tool/

More Repositories

1

dockdash

Docker dashboard using Termui
Go
121
star
2

docker-alpine-curl

Alpine with curl installed
Dockerfile
72
star
3

php-nats-streaming

Client for nats streaming server in php
PHP
44
star
4

capitan

Capitan is a tool for managing multiple Docker containers
Go
25
star
5

prometheus-gsheet

Google sheets remote write
Go
20
star
6

mapcast

Convert map[string]string into map[string]interface using a reference struct. Optionally respect json tags.
Go
13
star
7

pjson

Helps to easily JSON marshal / unmarshal tagged unions in go
Go
12
star
8

lurch

No oil painting but it does serve
Shell
7
star
9

docker-nginx-php7-fpm

Php7 Nginx Container
Shell
7
star
10

apibase

Base template/helper code for http apis.
Go
6
star
11

docker-nginx-php5-fpm

Dockerfile for nginx and php-fpm together.
Shell
4
star
12

mongo-to-s3

Backup mongodb databases to an s3 bucket
Shell
3
star
13

ember-hotjar

Hotjar integration for ember projects
JavaScript
3
star
14

docker-fluentd-containerd

Fluentd docker container that parses containerd log formats
Dockerfile
2
star
15

stan-http-forwarder

Forward from Nats-streaming queue topics to http endpoints
Go
2
star
16

zsh-aliases

My Zsh Aliases/Functions file
Shell
1
star
17

dokku-gnatsd-plugin

Dokku plugin to link apps to a gnatsd queue
Shell
1
star
18

partu

Go library to help with mundane sql fooery: generate insert, upsert, update and select statements
Go
1
star
19

dev-stack

Docker compose stack for microservices
Shell
1
star
20

docker-codeceptjs

Codeceptjs docker container.
1
star
21

stride

Rust STOMP client using Tokio
Rust
1
star
22

go-fortnox

Fortnox client in go.
Go
1
star