{"id":39400213,"url":"https://github.com/pengsrc/docker-tools","last_synced_at":"2026-01-18T03:23:36.917Z","repository":{"id":57589142,"uuid":"130986748","full_name":"pengsrc/docker-tools","owner":"pengsrc","description":"Handy tools for Docker.","archived":false,"fork":false,"pushed_at":"2018-04-25T10:10:52.000Z","size":20,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T11:54:27.395Z","etag":null,"topics":["build","docker","image","remote","tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pengsrc.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}},"created_at":"2018-04-25T10:00:22.000Z","updated_at":"2019-05-26T13:44:30.000Z","dependencies_parsed_at":"2022-09-26T19:34:48.022Z","dependency_job_id":null,"html_url":"https://github.com/pengsrc/docker-tools","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pengsrc/docker-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengsrc%2Fdocker-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengsrc%2Fdocker-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengsrc%2Fdocker-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengsrc%2Fdocker-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pengsrc","download_url":"https://codeload.github.com/pengsrc/docker-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengsrc%2Fdocker-tools/sbom","scorecard":{"id":727116,"data":{"date":"2025-08-11","repo":{"name":"github.com/pengsrc/docker-tools","commit":"853193cb551d1fdf22c380e81bef1fb5d77de3c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/pengsrc/docker-tools/releases/10710646","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/pengsrc/docker-tools/releases/10710646"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T13:09:07.869Z","repository_id":57589142,"created_at":"2025-08-22T13:09:07.869Z","updated_at":"2025-08-22T13:09:07.869Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["build","docker","image","remote","tools"],"created_at":"2026-01-18T03:23:36.269Z","updated_at":"2026-01-18T03:23:36.895Z","avatar_url":"https://github.com/pengsrc.png","language":"Go","readme":"# docker-tools\n\n[![Build Status](https://travis-ci.org/pengsrc/docker-tools.svg?branch=master)](https://travis-ci.org/pengsrc/docker-tools)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pengsrc/docker-tools)](https://goreportcard.com/report/github.com/pengsrc/docker-tools)\n[![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/pengsrc/docker-tools/blob/master/LICENSE)\n\nHandy tools for Docker.\n\n## What's Inside\n\nCurrently, this project contains a command-line tool called `docker-tools`.\n\nAnd some useful scripts will be provided later on.\n\n## Installation the Command Line Tool\n\n### Install from Source Code\n\n``` bash\n$ git clone git@github.com:pengsrc/docker-tools.git\n$ cd docker-tools\n$ glide install\n...\n[INFO]\tReplacing existing vendor dependencies\n$ make install\n...\nInstalling into /data/go/bin/docker-tools...\nDone\n```\n\n### Download Precompiled Binary\n\n1. Go to [releases tab](https://github.com/pengsrc/docker-tools/releases) and download the binary for your operating system.\n2. Unarchive the downloaded file, and put the executable file `docker-tools` into a directory that in the `$PATH` environment variable, for example `/usr/local/bin`.\n3. Run `docker-tools --help` to get started.\n\n``` Bash\n$ docker-tools --help\nHandy tools for Docker\n\nUsage:\n  docker-tools [flags]\n  docker-tools [command]\n\nAvailable Commands:\n  help          Help about any command\n  remote-import Import docker image from one registry to another\n  remote-build  Build docker image and push to specified registry\n\nFlags:\n  -c, --config string   Configuration file (default is ${HOME}/.docker-tools.yaml)\n      --help            Show help\n  -v, --version         Show version\n\nUse \"docker-tools [command] --help\" for more information about a command.\n```\n\n## Usage of the Command Line Tool\n\n### Configuration\n\nBasically, you don't need a config file, because all of the options can be passed from command flags. But, you can also place a config file to predefine some options that are frequently used. The default config file location is `~/.docker-tools.yaml`, alternatively, the config file location can be override with `--config` flag.\n\nA config file example can be found at `./cmds/configs/docker-tools.yaml.example`:\n\n``` YAML\n# Configuration example for docker-tools\n# than should be placed at \"~/.docker-tools.yaml\".\n\n# Host to remote build \u0026 import images.\nbuilder:\n  host: 127.0.0.1\n  port: 22\n\n# Docker registry to push built images and imported images.\nregistry: registry.example.com\n```\n\n\n### Build Docker Image on Remote Machine\n\nSubcommand `remote-build` of `docker-tools` has the ability to build Docker image on remote server and push the built image to a specified image registry. It can also detect git repository and extract corresponding version of source code to build.\n\nAll available options are:\n\n``` Bash\n$ docker-tools remote-build --help\n...\nFlags:\n  -a, --after string          Command to execute after the build\n  -b, --before string         Command to execute before the build\n  -d, --directory string      Source directory to use\n  -f, --dockerfile string     Dockerfile to use in build (default \"Dockerfile\")\n  -e, --exclude stringArray   Files to exclude in package\n  -g, --git-archive           Use git archive to pack files\n      --help                  Show help\n  -h, --host string           SSH host to run import procedures (default \"127.0.0.1\")\n  -i, --include stringArray   Files to include in package\n  -p, --port int              SSH port to connect (default 22)\n  -r, --registry string       Registry to push image (default \"registry.example.com\")\n  -u, --user string           SSH username (default \"root\")\n...\n```\n\nExample:\n\n``` Bash\n$ glide install\n...\n[INFO]\tReplacing existing vendor dependencies\n\n$ docker-tools remote-build -g service/test:latest -i vendor\nOn branch develop\nYour branch is up to date with 'origin/develop'.\n\nnothing to commit, working tree clean\nlatest\nfatal: ambiguous argument 'latest': unknown revision or path not in the working tree.\nusing the latest commit...\nExecuting: /bin/pwd [pwd]\n/data/go/src/example.com/service/test\nExecuting: /usr/local/bin/git [git archive --format tar e8b54fa]\nExecuting: /usr/local/bin/gtar [gtar --transform s,^./,,g -rf /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212 vendor]\nExecuting: /usr/bin/gzip [gzip -9f /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212]\nExecuting: /bin/mv [mv /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212.gz /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212]\nExecuting: /usr/local/bin/gtar [gtar -tf /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212]\n.gitignore\n.gitmodules\nDockerfile\n...\nExecuting: mkdir -p /builds\nExecuting: /usr/bin/scp [scp -P 22 /var/folders/ln/98ndp7416gx5v3mn7gv78ntm0000gn/T/1524649721-943271212 root@127.0.0.1:/builds/1524649721-943271212.tar.gz]\n1524649721-943271212                                                                          100%   13MB   7.4MB/s   00:01\nExecuting: mkdir -p /builds/1524649721-943271212\nExecuting: cd /builds/1524649721-943271212\nExecuting: tar -xf /builds/1524649721-943271212.tar.gz\nExecuting: docker build -f Dockerfile -t registry.example.com/service/test:e8b54fa .\nExecuting: docker push registry.example.com/service/test:e8b54fa\nExecuting: rm -f /builds/1524649721-943271212.tar.gz\nExecuting: rm -rf /builds/1524649721-943271212\nSending build context to Docker daemon   67.8MB\nStep 1/11 : FROM registry.example.com/library/builder-go:1.9.2 as builder\n ---\u003e 3b7a1b768e1d\nStep 2/11 : COPY . /data/go/src/example.com/test\n ---\u003e 1ddaf12d7713\n...\n ---\u003e Using cache\n ---\u003e 2e762bf4e128\nSuccessfully built 2e762bf4e128\nSuccessfully tagged registry.example.com/service/test:e8b54fa\nThe push refers to repository [registry.example.com/service/test]\n604d8539a0d8: Layer already exists\nff8f9e6fab20: Layer already exists\na4c0a34c75f3: Layer already exists\n9dfa40a0da3b: Layer already exists\ne8b54fa: digest: sha256:f51282c918fdb52e9ba5862f383d328ce559d03a1415611660623505f93e2893 size: 1157\n```\n\n### Import Docker Image\n\nSubcommand `remote-import` of `docker-tools` pulls a given image on remote server and push the image to another registry.\n\nAll available options are:\n\n``` Bash\n$ docker-tools remote-import --help\n...\nFlags:\n  -f, --from string   Registry to import image from (default \"docker.io\")\n      --help          Show help\n  -h, --host string   SSH host to run import procedures (default \"127.0.0.1\")\n  -p, --port int      SSH port to connect (default 22)\n  -t, --to string     Registry to export image to (default \"registry.example.com\")\n  -u, --user string   SSH username (default \"root\")\n...\n```\n\nExample:\n\n``` Bash\n$ docker-tools remote-import redis:4.0.2\nExecuting: docker pull docker.io/redis:4.0.2\nExecuting: docker tag docker.io/redis:4.0.2 registry.example.com/docker.io/redis:4.0.2\nExecuting: docker push registry.example.com/docker.io/redis:4.0.2\nExecuting: docker rmi docker.io/redis:4.0.2 registry.example.com/docker.io/redis:4.0.2\n4.0.2: Pulling from library/redis\nd13d02fa248d: Pull complete\n039f8341839e: Pull complete\n21b9cdda7eb9: Pull complete\nc3eba3e5fbc2: Pull complete\n7778a0753f87: Pull complete\nb052cf77de81: Pull complete\nDigest: sha256:cd277716dbff2c0211c8366687d275d2b53112fecbf9d6c86e9853edb0900956\nStatus: Downloaded newer image for redis:4.0.2\nThe push refers to repository [registry.example.com/docker.io/redis]\n4aa04ab0fe76: Layer already exists\n967b580842df: Layer already exists\n22fc1222979f: Layer already exists\n9503917b6420: Layer already exists\naa84bbcc6553: Layer already exists\n29d71372a492: Layer already exists\n4.0.2: digest: sha256:3c07847e5aa6911cf5d9441642769d3b6cd0bf6b8576773ae3a0742056b9dd47 size: 1571\nUntagged: redis:4.0.2\nUntagged: redis@sha256:cd277716dbff2c0211c8366687d275d2b53112fecbf9d6c86e9853edb0900956\nUntagged: registry.example.com/docker.io/redis:4.0.2\nUntagged: registry.example.com/docker.io/redis@sha256:3c07847e5aa6911cf5d9441642769d3b6cd0bf6b8576773ae3a0742056b9dd47\nDeleted: sha256:8f2e175b3bd129fd9416df32a0e51f36632e3ab82c5608b4030590ad79f0be12\nDeleted: sha256:dc220825bf188145846d269e04e122f8d53194a8b18652df23410ba114dde020\nDeleted: sha256:f76a80a6c86476894da4c51e6415cc0201dbcd75b135e74e069d09bc51bcd094\nDeleted: sha256:dbe291a244f66ac9ab2d76f3106e21f23479ab966e8437a7dba9ac13b0a9a793\nDeleted: sha256:f9a111ff6d25e72d0448c4490ee6f3296ce44653933951fe96e50dcd809f35dc\nDeleted: sha256:72ed9453809fb6a19a7a5101af4efbf1328c87b1d24ce02cc73cfd034f125166\nDeleted: sha256:29d71372a4920ec230739a9e2317e7e9b18644edb10f78cde85df85e6ab85fc2\n```\n\n## License\n\nThe Apache License (Version 2.0, January 2004).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengsrc%2Fdocker-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpengsrc%2Fdocker-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengsrc%2Fdocker-tools/lists"}