{"id":20510345,"url":"https://github.com/frobware/imagequalifier","last_synced_at":"2025-03-05T22:26:10.996Z","repository":{"id":66961034,"uuid":"114401613","full_name":"frobware/imagequalifier","owner":"frobware","description":"A library that qualifies unqualified Docker images.","archived":false,"fork":false,"pushed_at":"2017-12-19T12:33:56.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T07:38:27.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frobware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-15T18:49:12.000Z","updated_at":"2017-12-15T18:53:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"b26d173d-d879-497b-91a1-35180d514306","html_url":"https://github.com/frobware/imagequalifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fimagequalifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fimagequalifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fimagequalifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fimagequalifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frobware","download_url":"https://codeload.github.com/frobware/imagequalifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112691,"owners_count":20073651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:29:07.599Z","updated_at":"2025-03-05T22:26:10.972Z","avatar_url":"https://github.com/frobware.png","language":"Go","readme":"[![Travis CI](https://travis-ci.org/frobware/imagequalifier.svg?branch=master)](https://travis-ci.org/frobware/imagequalifier)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/frobware/imagequalifier)\n[![Coverage Status](http://codecov.io/github/frobware/imagequalifier/coverage.svg?branch=master)](http://codecov.io/github/frobware/imagequalifier?branch=master)\n[![Report Card](https://goreportcard.com/badge/github.com/frobware/imagequalifier)](https://goreportcard.com/report/github.com/frobware/imagequalifier)\n\nThis library and CLI tool is an experiment that, given a set of rules,\nwill qualify bare images names to include a domain (e.g.,\n`registry.io`) component.\n\nAn unqualified image is something like `library/emacs` or `emacs`, or\n`emacs:v26`. A qualified image has a domain component (e.g.,\n`prep.ai.mit.edu/library/emacs`).\n\n## Pattern Matching Rules\n\n- Rules are new-line separated\n- There are two fields per line, separated by one or more whitespace characters\n- First field is the pattern\n- Second field is the domain\n- Blank/Empty lines are skipped\n- Comment lines are skipped and begin with #.\n\n### Rule Ordering (aka Partial Ordering)\n\n(TBD) Should rules be automagically ordered when parsed?\n\n- Currently no reordering of the rules is attempted\n- Rules are attempted in the order presented\n- _the first match wins_\n\n## Pattern Syntax\n\nNote: semantics stolen from `path.Match()`.\n\n\t\tpattern:\n\t\t\t{ term }\n\t\tterm:\n\t\t\t'*'         matches any sequence of non-/ characters\n\t\t\t'?'         matches any single non-/ character\n\t\t\t'[' [ '^' ] { character-range } ']'\n\t\t\t\t\t\tcharacter class (must be non-empty)\n\t\t\tc           matches character c (c != '*', '?', '\\\\', '[')\n\t\t\t'\\\\' c      matches character c\n\n\t\tcharacter-range:\n\t\t\tc           matches character c (c != '\\\\', '-', ']')\n\t\t\t'\\\\' c      matches character c\n\t\t\tlo '-' hi   matches character c for lo \u003c= c \u003c= hi\n\nMatching requires pattern to match all of name, not just a substring.\n\n## Examples\n\nThe simplest pattern to pull images that do not contain a repository\ncomponent from `internal.io` is:\n\n\t* internal.io\n\nThis pattern will transform any bare image to `internal.io/\u003cimage\u003e`.\nNote: it will not transform `myrepo/nginx` to\n`internal.io/myrepo/nginx` because the pattern needs to match all\nsegments of the [pattern] path.\n\nTo match any image and force it to pull from `internal.io` the\nfollowing rules are required:\n\n\t*/*   internal.io\n\t*     internal.io\n\nMaking all latest tags come from a dev registry:\n\n\t*/*:latest dev.io\n\t*/*        internal.io\n\t*          internal.io\n\nForcing nginx v1.2.3 to come from docker.io.\n\n\t*/nginx:v1.2.3   docker.io\n\n\tyou/*            you.io\n\tme/*             me.io\n\n\t*/*              internal.io\n\t*                internal.io\n\n### Sample Rules\n\n\t$ cat $GOPATH/src/github.com/frobware/imagequalifier/testdata/sample-rules\n\n\tbusybox                    busybox.com\n\t*/emacs                    emacs.com\n\tmyrepo/*                   myrepo.com\n\tnginx:v[1-9].[0-9]*        nginx.com\n\t*/*                        internal.com\n\t*                          external.com\n\n### Sample Matches\n\n| Image          | Qualified Image          |\n|----------------|--------------------------|\n| `emacs`        | `external.com/emacs`     |\n| `busybox`      | `busybox.com/busybox`    |\n| `myrepo/emacs` | `emacs.com/myrepo/emacs` |\n| `nginx`        | `external.com/nginx`     |\n| `nginx:v1.0`   | `nginx.com/nginx`        |\n\n### Test by example\n\n\t$ go install github.com/frobware/imagequalifier/...\n\n\t$ imagequalifier $GOPATH/src/github.com/frobware/imagequalifier/testdata/sample-rules emacs\n\tinternal.io/emacs\n\n\t$ imagequalifier $GOPATH/src/github.com/frobware/imagequalifier/testdata/sample-rules library/emacs\n\temacs.com/library/emacs\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fimagequalifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrobware%2Fimagequalifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fimagequalifier/lists"}