{"id":13582329,"url":"https://github.com/goodwithtech/dockertags","last_synced_at":"2025-04-14T22:21:44.784Z","repository":{"id":49896117,"uuid":"206924583","full_name":"goodwithtech/dockertags","owner":"goodwithtech","description":"a CLI tool for fetching container image tag information group by OS/ARCH","archived":false,"fork":false,"pushed_at":"2024-04-16T06:01:16.000Z","size":2530,"stargazers_count":81,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T10:21:22.652Z","etag":null,"topics":["amazon-ecr","docker","gcr","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goodwithtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-09-07T06:12:08.000Z","updated_at":"2025-02-01T18:56:26.000Z","dependencies_parsed_at":"2024-06-19T00:18:42.437Z","dependency_job_id":"da4569b1-bbd2-453e-b924-369c81abc997","html_url":"https://github.com/goodwithtech/dockertags","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goodwithtech%2Fdockertags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goodwithtech%2Fdockertags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goodwithtech%2Fdockertags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goodwithtech%2Fdockertags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goodwithtech","download_url":"https://codeload.github.com/goodwithtech/dockertags/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248969085,"owners_count":21191190,"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":["amazon-ecr","docker","gcr","go"],"created_at":"2024-08-01T15:02:36.107Z","updated_at":"2025-04-14T22:21:44.762Z","avatar_url":"https://github.com/goodwithtech.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cimg src=\"assets/dockertags.png\" width=\"300\" /\u003e\n\nShow information of container images ordered by recently updated. \u003cbr /\u003e\nNow supporting Docker Hub, GitHub Container Repository (ghcr.io), GCR (Google Container Registry) and Amazon ECR (Elastic Container Registry).\n\n## Quick Start\n\n```bash\n$ brew install goodwithtech/r/dockertags\n$ dockertags [IMAGE_NAME]\n\nor \n\n$ docker run --rm goodwithtech/dockertags [IMAGENAME]\n```\n## When to Use\n\nMake easy to fetch target tag in scheduled operation.\n \n```.env\n$ dockertags -limit 1 -format json \u003cimagename\u003e | jq -r .[0].tags[0]\n...output tag...\n\n# Scan a latest container image with https://github.com/aquasecurity/trivy\n$ export IMAGENAME=\u003cimagename\u003e\n$ trivy $IMAGENAME:$(dockertags -limit 1 -format json $IMAGENAME | jq -r .[0].tags[0])\n```\n\n## Examples\n\n```bash\n\n$ dockertags alpine\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n|              TAG               |              SIZE              |             DIGEST             |            OS/ARCH             | CREATED AT |     UPLOADED AT      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n| 3.9                            | 2.7M                           | fa5361fbf636                   | linux/ppc64le                  | NULL       | 2020-01-23T17:42:13Z |\n| 3.9.5                          | 2.6M                           | c7b3e8392e08                   | linux/386                      |            |                      |\n|                                | 2.6M                           | cae6522b6a35                   | linux/arm64                    |            |                      |\n|                                | 2.2M                           | 0c6b515386fd                   | linux/arm                      |            |                      |\n|                                | 2.4M                           | 97e9e9a15ef9                   | linux/s390x                    |            |                      |\n|                                | 2.4M                           | 5292cebaf695                   | linux/arm                      |            |                      |\n|                                | 2.6M                           | ab3fe83c0696                   | linux/amd64                    |            |                      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n| 3.8                            | 2M                             | e802987f152d                   | linux/arm64                    | NULL       | 2020-01-23T17:41:40Z |\n| 3.8.5                          | 2.1M                           | 402d21757a03                   | linux/ppc64le                  |            |                      |\n|                                | 2.2M                           | cf35b4fa14e2                   | linux/386                      |            |                      |\n|                                | 2M                             | dabea2944dcc                   | linux/arm                      |            |                      |\n|                                | 2.1M                           | 954b378c375d                   | linux/amd64                    |            |                      |\n|                                | 2.2M                           | 514ec80ffbe1                   | linux/s390x                    |            |                      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n| 3.10                           | 2.7M                           | 33158d51a7a5                   | linux/ppc64le                  | NULL       | 2020-01-23T17:41:10Z |\n| 3.10.4                         | 2.7M                           | de78803598bc                   | linux/amd64                    |            |                      |\n|                                | 2.5M                           | 9afbfccb8066                   | linux/arm                      |            |                      |\n|                                | 2.7M                           | 747f335d2f68                   | linux/386                      |            |                      |\n|                                | 2.5M                           | 216161924b52                   | linux/s390x                    |            |                      |\n|                                | 2.3M                           | 2632d6288d34                   | linux/arm                      |            |                      |\n|                                | 2.6M                           | 4491fd429b8a                   | linux/arm64                    |            |                      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n| edge                           | 2.6M                           | fb7bea212348                   | linux/arm64                    | NULL       | 2020-01-23T00:41:09Z |\n| 20200122                       | 2.5M                           | e3e522f13253                   | linux/arm                      |            |                      |\n|                                | 2.7M                           | 7b5953e862c9                   | linux/ppc64le                  |            |                      |\n|                                | 2.3M                           | e137ff293fcc                   | linux/arm                      |            |                      |\n|                                | 2.7M                           | 5f60bf03cace                   | linux/386                      |            |                      |\n|                                | 2.5M                           | cb3bf0adee89                   | linux/s390x                    |            |                      |\n|                                | 2.7M                           | 9898e9a51db3                   | linux/amd64                    |            |                      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n| latest                         | 2.6M                           | 4d5c59516695                   | linux/arm64                    | NULL       | 2020-01-18T02:41:10Z |\n| 3.11.3                         | 2.3M                           | 2c26a655f6e3                   | linux/arm                      |            |                      |\n|                                | 2.5M                           | 401f030aa35e                   | linux/arm                      |            |                      |\n|                                | 2.7M                           | ddba4d27a7ff                   | linux/amd64                    |            |                      |\n|                                | 2.5M                           | ef20eb43010a                   | linux/s390x                    |            |                      |\n|                                | 2.7M                           | c40c013324aa                   | linux/386                      |            |                      |\n|                                | 2.7M                           | ff8a6adf5859                   | linux/ppc64le                  |            |                      |\n+--------------------------------+--------------------------------+--------------------------------+--------------------------------+------------+----------------------+\n\n# You can set limit, filter and format\n$ dockertags  -limit 1 -contain latest -format json alpine\n[\n  {\n    \"tags\": [\n      \"latest\",\n      \"3.11.3\",\n      \"3.11\",\n      \"3\"\n    ],\n    \"data\": [\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"ppc64le\",\n        \"Digest\": \"sha256:ff8a6adf5859433869343296f1b06e0a7bdf4fc836b08d5854221e351baf6929\",\n        \"byte\": 2822125\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"arm64\",\n        \"Digest\": \"sha256:4d5c5951669588e23881c158629ae6bac4ab44866d5b4d150c3f15d91f26682b\",\n        \"byte\": 2723075\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"s390x\",\n        \"Digest\": \"sha256:ef20eb43010abda2d7944e0cd11ef00a961ff7a7f953671226fbf8747895417d\",\n        \"byte\": 2582031\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"arm\",\n        \"Digest\": \"sha256:401f030aa35e86bafd31c6cc292b01659cbde72d77e8c24737bd63283837f02c\",\n        \"byte\": 2617562\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"386\",\n        \"Digest\": \"sha256:c40c013324aa73f430d33724d8030c34b1881e96b23f44ec616f1caf8dbf445f\",\n        \"byte\": 2806560\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"amd64\",\n        \"Digest\": \"sha256:ddba4d27a7ffc3f86dd6c2f92041af252a1f23a8e742c90e6e1297bfa1bc0c45\",\n        \"byte\": 2802957\n      },\n      {\n        \"Os\": \"linux\",\n        \"Arch\": \"arm\",\n        \"Digest\": \"sha256:2c26a655f6e38294e859edac46230210bbed3591d6ff57060b8671cda09756d4\",\n        \"byte\": 2419554\n      }\n    ],\n    \"created_at\": \"0001-01-01T00:00:00Z\",\n    \"uploaded_at\": \"2020-01-18T02:41:10.850638Z\"\n  }\n]\n```\n\n## Usage\n\n```\nNAME:\n  dockertags - fetch docker image tags\n  dockertags [options] image_name\nOPTIONS:\n  --limit value, -l value        set max tags count. if exist no tag image will be short numbers. limit=0 means fetch all tags (default: 10)\n  --contain value, -c value      contains target string. multiple string allows.\n  --format value, -f value       target format table or json, default table (default: \"table\")\n  --output value, -o value       output file name, default output to stdout\n  --authurl value, --auth value  GetURL when fetch authentication\n  --timeout value, -t value      e.g)5s, 1m (default: 10s)\n  --username value, -u value     Username\n  --password value, -p value     Using -password via CLI is insecure. Be careful.\n  --debug, -d                    Show debug logs\n  --help, -h                     show help\n  --version, -v                  print the version\n```\n\n## GitHub Actions\n\nYou can scan target image everyday recently updated.\u003cbr /\u003e\nThis actions also notify results if trivy detects vulnerabilities.\n\n```\nname: Scan the target image with trivy\non:\n  schedule:\n      - cron:  '0 0 * * *'\njobs:\n  scan:\n    name: Scan via trivy\n    runs-on: ubuntu-latest\n    env:\n      IMAGE: goodwithtech/dockle # target image name\n      FILTER: v0.2    # pattern : /*v0.2*/\n    steps:\n      - name: detect a target image tag\n        id: target\n        run: echo ::set-output name=ver::$(\n            docker run --rm goodwithtech/dockertags -contain $FILTER -limit 1 -format json $IMAGE\n            | jq -r .[0].tags[0]\n            )\n      - name: detect a trivy image tag\n        id: trivy\n        run: echo ::set-output name=ver::$(\n            docker run --rm goodwithtech/dockertags -limit 1 -format json aquasec/trivy\n            | jq -r .[0].tags[0]\n            )\n      - name: check tags\n        run: |\n          echo trivy ${{ steps.trivy.outputs.ver }}\n          echo $IMAGE ${{ steps.target.outputs.ver }}\n      - name: scan the image with trivy\n        run: docker run aquasec/trivy:${{ steps.trivy.outputs.ver }}\n          --cache-dir /var/lib/trivy --exit-code 1 --no-progress\n          $IMAGE:${{ steps.target.outputs.ver }}\n      - name: notify to slack\n        if: failure()\n        uses: rtCamp/action-slack-notify@master\n        env:\n          SLACK_CHANNEL: channel  # target channel\n          SLACK_MESSAGE: 'failed : trivy detects vulnerabilities'\n          SLACK_TITLE: trivy-scan-notifier\n          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}\n```\n\n## Authentication\n\n### Docker Hub\n\nYou can use `--username` and `--password` of Docker Hub.\n\n```bash\ndockertags -u goodwithtech -p xxxx goodwithtech/privateimage\n```\n\n### Amazon ECR (Elastic Container Registry)\n\nUse [AWS CLI's ENVIRONMENT variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).\n\n```bash\nAWS_PROFILE={PROFILE_NAME}\nAWS_DEFAULT_REGION={REGION}\n```\n\n### GCR (Google Container Registry)\n\nIf you'd like to use the target project's repository, you can settle via `GOOGLE_APPLICATION_CREDENTIAL`.\n\n```bash\nGOOGLE_APPLICATION_CREDENTIALS=/path/to/credential.json\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodwithtech%2Fdockertags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodwithtech%2Fdockertags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodwithtech%2Fdockertags/lists"}