diff --git a/.gitattributes b/.gitattributes index c67b749b6..52928e995 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ *.css linguist-vendored -*.* linguist-language=Markdown +* linguist-language=Markdown diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 55d6bb2cf..ad6cfe7d5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -*.md @veggiemonk @agebhar1 @dmitrytokarev @gesellix @mashb1t @moshloop @vegasbrianc @noteed +* @veggiemonk @agebhar1 @dmitrytokarev @gesellix @mashb1t @moshloop @vegasbrianc @noteed diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e0fdbe2f5..ff9c7973a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,94 +1,90 @@ # Contributing to awesome-docker -First: if you're unsure or afraid of anything, just ask or submit the issue or pull request anyways. You won't be yelled at for giving your best effort. The worst that can happen is that you'll be politely asked to change something. We appreciate any sort of contributions, and don't want a wall of rules to get in the way of that. +Thanks for taking the time to contribute. -However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing all the points we're looking for, it raises the chances we can quickly merge or address your contributions. +This repository is a curated list of Docker/container resources plus a Go-based maintenance CLI used by CI. Contributions are welcome for both content and tooling. -We appreciate and recognize [all contributors](https://github.com/veggiemonk/awesome-docker/graphs/contributors). +Please read and follow the [Code of Conduct](./CODE_OF_CONDUCT.md). -Please note that this project is released with a [Contributor Code of Conduct](https://github.com/veggiemonk/awesome-docker/blob/master/.github/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. +## What We Accept -# Table of Contents +- New high-quality projects that are **for Docker** (see the test below) +- Fixes to descriptions, ordering, or categorization +- Removal of broken, archived, deprecated, or duplicate entries -- [Mission Statement](#mission-statement) -- [Quality Standards](#quality-standards) -- [Contribution Guidelines](#contribution-guidelines) -- [New Collaborators](#new-collaborators) +## The "for Docker" Test (read this before submitting) -# Mission Statement +This list is for projects whose purpose is to make working with Docker better. +It is **not** a directory of "software you can run in a container" — that's most +software ever written. Before opening a PR, apply this test: -`awesome-docker` is a hand-crafted list for high-quality information about Docker and its resources. It should be related or compatible with Docker or containers. If it's just an image built on top of Docker, the project possibly belongs to other [awesome lists](https://github.com/sindresorhus/awesome). You can check the [awesome-selfhosted list](https://github.com/Kickball/awesome-selfhosted) or the [awesome-sysadmin list](https://github.com/n1trux/awesome-sysadmin) as well. -If it's a **tutorial or a blog post**, they get outdated really quickly so we don't really put them on the list but if it is on a very advanced and/or specific topic, we will consider it! -If something is awesome, share it (pull request or [issue](https://github.com/veggiemonk/awesome-docker/issues/new) or [chat](https://gitter.im/veggiemonk/awesome-docker)), let us know why and we will help you! +> **If you removed the Docker integration, would the project still have a reason to exist?** +> +> - **Yes, it would** → it's a general tool that happens to use Docker. **Reject.** +> - **No, the project is *about* Docker** → it belongs here. -# Quality Standards +### Examples -Note that we can help you achieve those standards, just try your best and be brave. -We'll guide you to the best of our abilities. +| Project shape | Verdict | Why | +| ----------------------------------------------------------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------- | +| Tool that monitors **containers**, container resources, or container logs | ✅ Accept | Its value disappears if you take Docker away. | +| Tool that monitors **a host / server / service** and happens to ship as Docker | ❌ Reject | Its job is monitoring; Docker is just the delivery vehicle. | +| Reverse proxy that **auto-configures from Docker labels/events** | ✅ Accept | Tightly coupled to the Docker API. | +| Reverse proxy that just *runs in* Docker and configures from a static YAML file | ❌ Reject | Same proxy works fine without Docker. | +| Dockerfile linter, image scanner, registry, BuildKit frontend, runtime, SDK | ✅ Accept | Object of work is the Docker image, daemon, or socket. | +| General IaC scanner that **happens to read Dockerfiles** among many formats | ⚠️ Borderline | Allowed if Docker support is a first-class feature, not an afterthought. | +| "Awesome 150 web apps deployable with `docker run`" | ❌ Reject | Belongs in `awesome-selfhosted`; Docker is incidental. | +| Cron / privilege-drop / health-check utility designed for **container init** | ✅ Accept | Solves a problem that only exists *because* of how containers are built. | +| Generic KV store / service mesh / cluster scheduler that supports Docker | ❌ Reject | Existed before Docker, works without it. | +| Tutorial, video, or book whose **subject** is Docker | ✅ Accept | Under Useful Resources / Videos / Where to start. | +| Tutorial that uses Docker as a setup step for an unrelated topic | ❌ Reject | Belongs with the unrelated topic. | -To be on the list, it would be **nice** if entries adhere to these quality standards: +### One-sentence sanity check -- It should take less than 20 sec to find what is the project, how to install it and how to use it. -- Generally useful to the community. -- A project on GitHub with a well documented `README.md` file and plenty of examples is considered high quality. -- Clearly stating if an entry is related to (Linux) containers and not to Docker. There is an [awesome list](https://github.com/Friz-zy/awesome-linux-containers) for that. -- Clearly stating "what is it" i.e. which category it belongs to. -- Clearly stating "what is it for" i.e. mention a real problem it solves (even a small one). Make it clear for the next person. -- If it is a **WIP** (work in progress, not safe for production), please mention it. (Remember the time before Docker 1.0 ? ;-) ) -- Always put the link to the GitHub project instead of the website! +Write the sentence: *"This project exists to ____."* +If the blank doesn't contain **Docker, container, image, registry, Dockerfile, Compose, Swarm, BuildKit, or OCI** — it probably doesn't belong here. -To be on the list, the project **must** have: +## README Entry Rules -- How to setup/install the project -- How to use the project (examples) +- Use one link per entry. +- Prefer GitHub project/repository URLs over marketing pages. +- Keep entries alphabetically sorted within their section (case-insensitive). +- Keep descriptions concise and concrete: one sentence, lead with the verb. +- **The description should make the Docker connection obvious.** "Monitor + unhealthy containers" is good; "Monitor your services" is not — the latter + could be any monitoring tool, and a reviewer can't tell whether the project + passes the test above. +- Use `:yen:` for paid/commercial services. +- The project has been active in the last 2 years. +- Do not use `:skull:`; archived/deprecated projects should be removed. +- Avoid duplicate links and redirect variants. -If your PR is not merged, we will tell you why so that you may be able to improve it. -But usually, we are pretty relaxed people, so just come and say hi, we'll figure something out together. +## Local Validation -# Contribution Guidelines +```bash +# Build CLI +make build -## I want to share a project, what should I do? +# Validate README formatting and content +make lint -- **Adding to the list:** Submit a pull request or open an [issue](https://github.com/veggiemonk/awesome-docker/issues/new) -- **Removing from the list:** Submit a pull request or open an [issue](https://github.com/veggiemonk/awesome-docker/issues/new) -- Changing something else: Submit a pull request or open an [issue](https://github.com/veggiemonk/awesome-docker/issues/new) -- Don't know what to do: Open an [issue](https://github.com/veggiemonk/awesome-docker/issues/new) or join our [chat](https://gitter.im/veggiemonk/awesome-docker), let us know what's going on. +# Run code tests (when touching Go code) +make test -**join the chat:** +# Optional: full external checks (requires GITHUB_TOKEN) +./awesome-docker check +./awesome-docker validate +``` -[![Join the chat at https://gitter.im/veggiemonk/awesome-docker](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/veggiemonk/awesome-docker) +## Pull Request Expectations -or you can +- Keep the PR focused to one logical change. +- Explain what changed and why. +- If adding entries, include the target category. +- If removing entries, explain why (archived, broken, duplicate, etc.). -**ping us on Twitter:** +## Maintainer Notes -* [veggiemonk](https://twitter.com/veggiemonk) -* [idomyowntricks](https://twitter.com/idomyowntricks) -* [gesellix](https://twitter.com/gesellix) -* [dmitrytokarev](https://twitter.com/dmitrytok) - -### Rules for Pull Request - -- Each item should be limited to one link, no duplicates, no redirection (careful with `http` vs `https`!) -- The link should be the name of the package or project or website -- Description should be clear and concise (read it out loud to be sure) -- Description should follow the link, on the same line -- Entries are listed alphabetically, please respect the order -- If you want to add more than one link, please don't do all PR on the exact same line, it usually results in conflicts and your PR cannot be automatically merged... - -Please contribute links to packages/projects you have used or are familiar with. This will help ensure high-quality entries. - -#### Your commit message will be a [tweet](https://twitter.com/awesome_docker) so write a [good commit message](https://chris.beams.io/posts/git-commit/), keep that in mind :) - -# New Collaborators - -If you just joined the team of maintainers for this repo, first of all: WELCOME! - -If it is your first time maintaining an open source project, read the [best practice guides for maintainers](https://opensource.guide/best-practices/). - -Here are the few things you need to know: -* We don't push directly to the master branch. Every entry **MUST** be reviewed! -* Each entry should be in accordance to this quality standards and contribution guidelines. -* To ask a contributor to make a change, just copy paste this message [here](https://github.com/veggiemonk/awesome-docker/pull/289#issuecomment-285608004) and change few things like names and stuff. **The main idea is to help people making great projects.** -* If something seems weird, i.e. if you don't understand what a project does or the documentation is poor, don't hesitate to (nicely) ask for more explanation (see previous point). -* Say thank you to people who contribute to this project! It may not seems like much but respect and gratitude are important :D +- Changes should be reviewed before merge. +- Prefer helping contributors improve a PR over silently rejecting it. +- Keep `.github` documentation and workflows aligned with current tooling. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 243bff497..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ -Hi, - -I would like to add a link. - -**REPO**: - -**DESCRIPTION**: - -**AUTHOR**: - -Or directly write it: -```markdown -[REPO](https://github.com/AUTHOR/REPO) - DESCRIPTION. By [@AUTHOR](https://github.com/AUTHOR) -``` - diff --git a/.github/ISSUE_TEMPLATE/add-a-project.md b/.github/ISSUE_TEMPLATE/add-a-project.md new file mode 100644 index 000000000..e91972e24 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/add-a-project.md @@ -0,0 +1,20 @@ +--- +name: Add a project +about: Suggest a project for the list +title: "add: [PROJECT] in [SECTION]" +labels: pending-evaluation +--- +# IF THE PROJECT JUST RUNS IN DOCKER, AUTOMATICALLY DENIED + +- [ ] I HAVE READ .github/CONTRIBUTING.md + +Write the sentence: *"This project exists to ____."* + +If the blank doesn't contain **Docker, container, image, registry, Dockerfile, Compose, Swarm, BuildKit, or OCI**, it probably doesn't belong here. + +```markdown +[REPO](https://github.com/AUTHOR/REPO) - DESCRIPTION. +``` + + +Note: the project will be added faster if you create a PR (recommended!). diff --git a/.github/MAINTENANCE.md b/.github/MAINTENANCE.md new file mode 100644 index 000000000..bf76ce141 --- /dev/null +++ b/.github/MAINTENANCE.md @@ -0,0 +1,81 @@ +# Maintenance Guide + +This guide describes how maintainers keep the list and automation healthy. + +## Automated Workflows + +### Pull Requests / Weekly QA (`pull_request.yml`) + +- Runs on pull requests and weekly on Saturday. +- Builds the Go CLI and runs `./awesome-docker validate`. + +### Broken Links Report (`broken_links.yml`) + +- Runs weekly on Saturday and on manual trigger. +- Executes `./awesome-docker check`. +- Opens/updates a `broken-links` issue when problems are found. + +### Weekly Health Report (`health_report.yml`) + +- Runs weekly on Monday and on manual trigger. +- Executes `./awesome-docker health` then `./awesome-docker report`. +- Opens/updates a `health-report` issue. + +### Deploy to GitHub Pages (`deploy-pages.yml`) + +- Runs on pushes to `master` and manual trigger. +- Builds website with `./awesome-docker build` and publishes `website/`. + +## Day-to-Day Commands + +```bash +# Build CLI +make build + +# README lint/validation +make lint + +# Auto-fix formatting issues +./awesome-docker lint --fix + +# Link checks and health checks (requires GITHUB_TOKEN) +make check +make health +make report +``` + +## Content Maintenance Policy + +- Remove archived/deprecated projects instead of tagging them. +- Remove broken links that cannot be fixed. +- Keep sections alphabetically sorted. +- Keep descriptions short and actionable. + +## Suggested Review Cadence + +### Weekly + +- Triage open `broken-links` and `health-report` issues. +- Merge straightforward quality PRs. + +### Monthly + +- Review sections for stale/duplicate entries. +- Re-run `check` and `health` manually if needed. + +### Quarterly + +- Review `.github` docs and templates for drift. +- Confirm workflows still match repository tooling and policies. + +## Contributor Support + +When requesting PR changes, be explicit and actionable: + +- point to section/order problems, +- explain why a link should be removed, +- suggest exact wording when description quality is the issue. + +--- + +Last updated: 2026-02-27 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d671330ce..b09b5540c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,51 +1,11 @@ - - +# IF THE PROJECT JUST RUNS IN DOCKER, AUTOMATICALLY DENIED - +- [ ] I HAVE READ .github/CONTRIBUTING.md -# Quality Standards +Write the sentence: *"This project exists to ____."* -Note that we can help you achieve those standards, just try your best and be brave. -We'll guide you to the best of our abilities. +If the blank doesn't contain **Docker, container, image, registry, Dockerfile, Compose, Swarm, BuildKit, or OCI**, it probably doesn't belong here. -To be on the list, it would be **nice** if entries adhere to these quality standards: +What changed and why: -- It should take less than 20 sec to find what is the project, how to install it and how to use it. -- Generally useful to the community. -- A project on GitHub with a well documented `README.md` file and plenty of examples is considered high quality. -- Clearly stating if an entry is related to (Linux) containers and not to Docker. There is an [awesome list](https://github.com/Friz-zy/awesome-linux-containers) for that. -- Clearly stating "what is it" i.e. which category it belongs to. -- Clearly stating "what is it for" i.e. mention a real problem it solves (even a small one). Make it clear for the next person. -- If it is a **WIP** (work in progress, not safe for production), please mention it. (Remember the time before Docker 1.0 ? ;-) ) -- Always put the link to the GitHub project instead of the website! - -To be on the list, the project **must** have: - -- How to setup/install the project -- How to use the project (examples) - -If your PR is not merged, we will tell you why so that you may be able to improve it. -But usually, we are pretty relaxed people, so just come and say hi, we'll figure something out together. - -# Rules for Pull Request - -- Each item should be limited to one link, no duplicates, no redirection (careful with `http` vs `https`!) -- The link should be the name of the package or project or website -- Description should be clear and concise (read it out loud to be sure) -- Description should follow the link, on the same line -- Entries are listed alphabetically, please respect the order -- If you want to add more than one link, please don't do all PR on the exact same line, it usually results in conflicts and your PR cannot be automatically merged... - -Please contribute links to packages/projects you have used or are familiar with. This will help ensure high-quality entries. - -#### Your commit message will be a [tweet](https://twitter.com/awesome_docker) so write a [good commit message](https://chris.beams.io/posts/git-commit/), keep that in mind :) diff --git a/.github/config.yml b/.github/config.yml deleted file mode 100644 index bace7f664..000000000 --- a/.github/config.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for welcome - https://github.com/behaviorbot/welcome - -# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome - -# Comment to be posted to on first time issues -newIssueWelcomeComment: > - Thanks for opening your first issue here! - -# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome - -# Comment to be posted to on PRs from first time contributors in your repository -newPRWelcomeComment: > - Thank you for contributing. Please check out our contributing guidelines and welcome! - -# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congrats on merging your first pull request! Checkout the twitter account (https://twitter.com/awesome_docker) to see your PR :D - -# It is recommend to include as many gifs and emojis as possible \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..0f049c872 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Enable version updates for Go modules + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + + # Enable version updates for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/weekly-digest.yml b/.github/weekly-digest.yml deleted file mode 100644 index 6d4ba7e83..000000000 --- a/.github/weekly-digest.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for weekly-digest - https://github.com/apps/weekly-digest -publishDay: sun -canPublishIssues: true -canPublishPullRequests: true -canPublishContributors: true -canPublishStargazers: true -canPublishCommits: true \ No newline at end of file diff --git a/.github/workflows/broken_links.yml b/.github/workflows/broken_links.yml new file mode 100644 index 000000000..74b5b2dc5 --- /dev/null +++ b/.github/workflows/broken_links.yml @@ -0,0 +1,89 @@ +name: Broken Links Report + +on: + schedule: + - cron: "0 2 * * 6" + workflow_dispatch: + +concurrency: + group: broken-links-${{ github.ref }} + cancel-in-progress: false + +jobs: + check-links: + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + issues: write + + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7.0.0 + + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # ratchet:actions/setup-go@v6 + with: + go-version-file: go.mod + + - name: Build + run: go build -o awesome-docker ./cmd/awesome-docker + + - name: Run Link Check + id: link_check + run: ./awesome-docker ci broken-links --issue-file broken_links_issue.md --github-output "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create/Update Issue for Broken Links + if: steps.link_check.outputs.has_errors == 'true' + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # ratchet:actions/github-script@v9.0.0 + with: + script: | + const fs = require('fs'); + const issueBody = fs.readFileSync('broken_links_issue.md', 'utf8'); + + const issues = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + labels: 'broken-links', + per_page: 1 + }); + + if (issues.data.length > 0) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issues.data[0].number, + body: issueBody + }); + } else { + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: 'Broken Links Detected', + body: issueBody, + labels: ['broken-links', 'bug'] + }); + } + + - name: Close Issue if No Errors + if: steps.link_check.outputs.has_errors == 'false' + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # ratchet:actions/github-script@v9.0.0 + with: + script: | + const issues = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + labels: 'broken-links', + per_page: 1 + }); + if (issues.data.length > 0) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issues.data[0].number, + state: 'closed', + state_reason: 'completed' + }); + } diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 000000000..1c75a1354 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,49 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7.0.0 + + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # ratchet:actions/setup-go@v6 + with: + go-version-file: go.mod + + - name: Build CLI + run: go build -o awesome-docker ./cmd/awesome-docker + + - name: Build website + run: make website + + - name: Upload artifact + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # ratchet:actions/upload-pages-artifact@v5.0.0 + with: + path: ./website + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # ratchet:actions/deploy-pages@v5.0.0 diff --git a/.github/workflows/health_report.yml b/.github/workflows/health_report.yml new file mode 100644 index 000000000..44e26d5ae --- /dev/null +++ b/.github/workflows/health_report.yml @@ -0,0 +1,68 @@ +name: Weekly Health Report + +on: + schedule: + - cron: "0 9 * * 1" + workflow_dispatch: + +concurrency: + group: health-report-${{ github.ref }} + cancel-in-progress: false + +jobs: + health-check: + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + issues: write + + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7.0.0 + + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # ratchet:actions/setup-go@v6 + with: + go-version-file: go.mod + + - name: Build + run: go build -o awesome-docker ./cmd/awesome-docker + + - name: Run Health + Report + id: report + run: ./awesome-docker ci health-report --issue-file health_report.txt --github-output "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create/Update Issue with Health Report + if: steps.report.outputs.has_report == 'true' + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # ratchet:actions/github-script@v9.0.0 + with: + script: | + const fs = require('fs'); + const report = fs.readFileSync('health_report.txt', 'utf8'); + const issueBody = report; + + const issues = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + labels: 'health-report', + per_page: 1 + }); + + if (issues.data.length > 0) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issues.data[0].number, + body: issueBody + }); + } else { + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: 'Weekly Health Report - Repository Maintenance Needed', + body: issueBody, + labels: ['health-report', 'maintenance'] + }); + } diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1572d9be9..7224e4071 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,30 +1,29 @@ -name: Pull Requests +name: Pull Requests / Weekly QA on: pull_request: branches: - master + schedule: + - cron: "0 0 * * 6" jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - - uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d - with: - node-version: 12 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7.0.0 - - uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a - id: cache + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # ratchet:actions/setup-go@v6 with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + go-version-file: go.mod + + - name: Build + run: go build -o awesome-docker ./cmd/awesome-docker + + - name: Build website + run: ./awesome-docker build - - name: Install Dependencies - # if: steps.cache.outputs.cache-hit != 'true' - run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline - - run: npm run test-pr + - name: Validate + run: ./awesome-docker validate env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 13ca927e8..85afb4dce 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,8 @@ website/table.html .idea **/.DS_Store +.worktrees + +# Go +/awesome-docker +/.claude diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..356b7c4b9 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,74 @@ +# Sample golangci-lint config. Edit or delete to taste. +# Full reference: https://golangci-lint.run/usage/configuration/ +version: "2" + +run: + timeout: 5m + +linters: + enable: + - bodyclose # checks HTTP response body is closed + - copyloopvar # Go 1.22+ loop var capture + - dupword # catches "the the" + - durationcheck # multiplication of two durations + - embeddedstructfieldcheck + - errcheck # unchecked errors + - errorlint # errors.Is / errors.As hygiene + - forcetypeassert # type assertions without the comma-ok form + - gocritic # opinionated diagnostics + - gosec # security scanner + - govet # stdlib vet + - ineffassign # ineffectual assignments + - intrange # prefer `for range N` + - misspell # spelling + - modernize + - nilerr # `return nil` after checking err != nil + - noctx # http requests without context + - perfsprint # fmt.Sprintf → string concat where safe + - prealloc # slice preallocation hints + - staticcheck # staticcheck.io + - unconvert # redundant type conversions + - unparam # unused function parameters + - unused # dead code + + settings: + govet: + enable-all: true + disable: + - shadow + staticcheck: + checks: ["all", "-QF1001", "-QF1002"] # drop quick-fix style nags + gocritic: + enabled-tags: [diagnostic, performance] + disabled-checks: + - hugeParam + gosec: + excludes: + - G104 # covered by errcheck + - G204 # subprocess with variable — allowed in CLI tooling + - G306 # 0600 file perms — CLIs often write executables + + exclusions: + generated: lax + presets: [comments, common-false-positives, legacy, std-error-handling] + rules: + # Test code owns its fixtures. + - path: '_test\.go' + linters: [forcetypeassert, dupword, errcheck, gosec, unparam] + # CLI entry point: fmt.Fprint to stdout/stderr is fire-and-forget. + - linters: [errcheck] + source: 'fmt\.Fprint(ln|f)?\(' + +issues: + max-issues-per-linter: 50 + max-same-issues: 10 + +formatters: + settings: + golines: + max-len: 120 + tab-len: 8 + enable: + - golines + - gofmt + - goimports diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 000000000..56cb7a3d3 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,9 @@ +{ + "MD007": { + "indent": 4 + }, + "MD012": { + "maximum": 2 + }, + "MD013": false, +} diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 31102b28d..000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -14.18.1 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..4fa81ca9d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,57 @@ +# Agent Guidelines for awesome-docker + +This is a curated list of projects for Docker. +**The projects has to be for Docker, not just using Docker.** + +## Commands + +- Build CLI: `make build` (or `go build -o awesome-docker ./cmd/awesome-docker`) +- Rebuild from scratch: `make rebuild` +- Show local workflows: `make help` +- Format Go code: `make fmt` +- Run tests: `make test` (runs `go test ./internal/... -v`) +- Race tests: `make test-race` +- Lint README rules: `make lint` (runs `./awesome-docker lint`) +- Auto-fix lint issues: `make lint-fix` +- Check links: `make check` (runs `./awesome-docker check`; `GITHUB_TOKEN` enables GitHub repo checks) +- PR-safe link checks: `make check-pr` +- PR validation: `make validate` (lint + external link checks in PR mode) +- Build website: `make website` (generates `website/index.html` from `README.md`) +- Health scoring: `make health` (requires `GITHUB_TOKEN`, refreshes `config/health_cache.yaml`) +- Print health report (Markdown): `make report` +- Print health report (JSON): `make report-json` or `./awesome-docker report --json` +- Generate report files: `make report-file` (`HEALTH_REPORT.md`) and `make report-json-file` (`HEALTH_REPORT.json`) +- Maintenance shortcut: `make workflow-maint` (health + JSON report file) + +## Architecture + +- **Main content**: `README.md` (curated Docker/container resources) +- **CLI entrypoint**: `cmd/awesome-docker/main.go` (Cobra commands) +- **Core packages**: + - `internal/parser` - parse README sections and entries + - `internal/linter` - alphabetical/order/format validation + autofix + - `internal/checker` - HTTP and GitHub link checks + - `internal/scorer` - repository health scoring and report generation + - `internal/cache` - exclude list and health cache read/write + - `internal/builder` - render README to website HTML from template +- **Config**: + - `config/exclude.yaml` - known link-check exclusions + - `config/website.tmpl.html` - HTML template for site generation + - `config/health_cache.yaml` - persisted health scoring cache +- **Generated outputs**: + - `awesome-docker` - compiled CLI binary + - `website/index.html` - generated website + - `HEALTH_REPORT.md` - generated markdown report + - `HEALTH_REPORT.json` - generated JSON report + +## Content Guidelines (from CONTRIBUTING.md) + +- **The projects has to be for Docker, not just using Docker.** +- Use one link per entry +- Prefer project/repository URLs over marketing pages +- Keep entries alphabetically ordered within each section +- Keep descriptions concise and concrete +- Use `:yen:` only for paid/commercial services +- Use `:ice_cube:` for stale projects (2+ years inactive) +- Remove archived/deprecated projects instead of tagging them +- Avoid duplicate links and redirect variants diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 000000000..47dc3e3d8 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..813636dca --- /dev/null +++ b/Makefile @@ -0,0 +1,148 @@ +SHELL := /bin/bash + +BINARY ?= awesome-docker +GO ?= go +CMD_PACKAGE := ./cmd/awesome-docker +INTERNAL_PACKAGES := ./internal/... +WEBSITE_OUTPUT := website/index.html +HEALTH_CACHE := config/health_cache.yaml +HEALTH_REPORT_MD := HEALTH_REPORT.md +HEALTH_REPORT_JSON := HEALTH_REPORT.json + +GO_SOURCES := $(shell find cmd internal -type f -name '*.go') +BUILD_INPUTS := $(GO_SOURCES) go.mod go.sum +WEBSITE_INPUTS := README.md config/website.tmpl.html +HEALTH_INPUTS := README.md config/exclude.yaml + +.DEFAULT_GOAL := help + +.PHONY: help \ + build rebuild clean \ + fmt test test-race \ + lint lint-fix fix-order check check-pr validate website \ + guard-github-token health health-cache \ + report report-json report-file report-json-file health-report \ + workflow-dev workflow-pr workflow-maint workflow-ci + +help: ## Show the full local workflow and available targets + @echo "awesome-docker Makefile" + @echo + @echo "Workflows:" + @echo " make workflow-dev # local iteration (fmt + test + lint + check-pr + website)" + @echo " make workflow-pr # recommended before opening/updating a PR" + @echo " make workflow-maint # repository maintenance (health + JSON report)" + @echo " make workflow-ci # CI-equivalent checks" + @echo + @echo "Core targets:" + @echo " make build # build CLI binary" + @echo " make test # run internal Go tests" + @echo " make lint # validate README formatting/content rules" + @echo " make check # check links (uses GITHUB_TOKEN when set)" + @echo " make validate # run PR validation (lint + check --pr)" + @echo " make website # generate website/index.html" + @echo " make report-file # generate HEALTH_REPORT.md" + @echo " make report-json-file# generate HEALTH_REPORT.json" + @echo " make health # refresh health cache (requires GITHUB_TOKEN)" + @echo " make report # print markdown health report" + @echo " make report-json # print full JSON health report" + @echo + @echo "Generated artifacts:" + @echo " $(BINARY)" + @echo " $(WEBSITE_OUTPUT)" + @echo " $(HEALTH_CACHE)" + @echo " $(HEALTH_REPORT_MD)" + @echo " $(HEALTH_REPORT_JSON)" + +$(BINARY): $(BUILD_INPUTS) + $(GO) build -o $(BINARY) $(CMD_PACKAGE) + +build: $(BINARY) ## Build CLI binary + +rebuild: clean build ## Rebuild from scratch + +clean: ## Remove generated binary + rm -f $(BINARY) $(HEALTH_REPORT_MD) $(HEALTH_REPORT_JSON) + +fmt: ## Format Go code + $(GO) fmt ./... + +test: ## Run internal unit tests + $(GO) test $(INTERNAL_PACKAGES) -v + +test-race: ## Run internal tests with race detector + $(GO) test $(INTERNAL_PACKAGES) -race + +lint: build ## Validate README formatting/content rules + ./$(BINARY) lint + +lint-fix: build ## Auto-fix lint issues when possible + ./$(BINARY) lint --fix + +fix-order: build ## Sort README entries alphabetically + ./$(BINARY) fix-order + +check: build ## Check links (GitHub checks enabled when GITHUB_TOKEN is set) + ./$(BINARY) check + +check-pr: build ## Check links in PR mode (external links only) + ./$(BINARY) check --pr + +validate: build ## Run PR validation (lint + check --pr) + ./$(BINARY) validate + +$(WEBSITE_OUTPUT): $(BINARY) $(WEBSITE_INPUTS) + ./$(BINARY) build + +website: $(WEBSITE_OUTPUT) ## Generate website from README + +guard-github-token: + @if [ -z "$$GITHUB_TOKEN" ]; then \ + echo "GITHUB_TOKEN is required for this target."; \ + echo "Set it with: export GITHUB_TOKEN="; \ + exit 1; \ + fi + +$(HEALTH_CACHE): guard-github-token $(BINARY) $(HEALTH_INPUTS) + ./$(BINARY) health + +health-cache: $(HEALTH_CACHE) ## Update config/health_cache.yaml + +health: ## Refresh health cache from GitHub metadata + @$(MAKE) --no-print-directory -B health-cache + +report: build ## Print markdown health report from cache + ./$(BINARY) report + +report-json: build ## Print full health report as JSON + ./$(BINARY) report --json + +$(HEALTH_REPORT_MD): $(BINARY) $(HEALTH_CACHE) + ./$(BINARY) report > $(HEALTH_REPORT_MD) + +report-file: $(HEALTH_REPORT_MD) ## Generate HEALTH_REPORT.md from cache + +$(HEALTH_REPORT_JSON): $(BINARY) $(HEALTH_CACHE) + ./$(BINARY) report --json > $(HEALTH_REPORT_JSON) + +report-json-file: $(HEALTH_REPORT_JSON) ## Generate HEALTH_REPORT.json from cache + +health-report: health report-file ## Refresh health cache then generate HEALTH_REPORT.md + +browse: build ## Launch interactive TUI browser + ./$(BINARY) browse + +workflow-dev: fmt test lint check-pr website ## Full local development workflow + +workflow-pr: fmt test validate ## Recommended workflow before opening a PR + +workflow-maint: health report-json-file ## Weekly maintenance workflow + +workflow-ci: test validate ## CI-equivalent validation workflow + +update-ga: + ratchet upgrade .github/workflows/* + +update-go: + go get -u go@latest + go get -u ./... + go mod tidy diff --git a/README.md b/README.md index 26118251a..19a400472 100644 --- a/README.md +++ b/README.md @@ -1,751 +1,599 @@ -# Awesome Docker [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)][sindresorhus] [![Netlify Status](https://api.netlify.com/api/v1/badges/8ca86717-11ba-46d4-9d0a-700d8527f13b/deploy-status)](https://app.netlify.com/sites/awesome-docker/deploys) +# Awesome Docker [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)][sindresorhus] [![Track Awesome List](https://www.trackawesomelist.com/badge.svg)](https://www.trackawesomelist.com/veggiemonk/awesome-docker/)[![Last Commit](https://img.shields.io/github/last-commit/veggiemonk/awesome-docker)](https://github.com/veggiemonk/awesome-docker/commits/main) -> A curated list of Docker resources and projects +> A curated list of projects for Docker. -If you would like to contribute, please read [CONTRIBUTING.md][contributing] first. -It contains a lot of tips and guidelines to help keep things organized. -Just click [README.md][editreadme] to submit a [pull request][editreadme]. -If this list is not complete, you can [contribute][editreadme] to make it so. Here is a great video tutorial to learn how to [contribute on Github](https://egghead.io/lessons/javascript-identifying-how-to-contribute-to-an-open-source-project-on-github). +If you would like to contribute, please read [CONTRIBUTING.md](https://github.com/veggiemonk/awesome-docker/blob/master/.github/CONTRIBUTING.md) first. +If this list is not complete, you can contribute to make it so. +If you see a link here that is not (any longer) a good fit, you can fix it by submitting a [pull request][editreadme] to improve this file. Thank you! -**_You can see the updates on [TWITTER](https://twitter.com/awesome_docker)_** +**The project has to be for Docker, not just using Docker.** -> **Please**, help organize these resources so that they are _easy to find_ and _understand_ for newcomers. See how to **[Contribute][contributing]** for tips! +> Rule of thumb: if removing the Docker integration wouldn't kill the project's value proposition, it doesn't belong in the this list. -**_If you see a link here that is not (any longer) a good fit, you can fix it by submitting a [pull request][editreadme] to improve this file. Thank you!_** +The creators and maintainers of this list do not receive any form of payment to accept a change made by any contributor. +This page is not an official Docker product in any way. +It is a list of links to projects and is maintained by volunteers. +Everybody is welcome to contribute. +The goal of this repo is to index open-source projects, not to advertise for profit. -The creators and maintainers of this list do not receive any form of payment to accept a change made by any contributor. This page is not an official Docker product in any way. It is a list of links to projects and is maintained by volunteers. Everybody is welcome to contribute. The goal of this repo is to index open-source projects, not to advertise for profit. +> Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud. -All the links are monitored and tested with a home baked [Node.js script](https://github.com/veggiemonk/awesome-docker/blob/master/pull_request.js) +_Source:_ [What is Docker](https://www.docker.com/why-docker/) # Contents -- [Legend](#legend) -- [What is Docker](#what-is-docker) -- [Where to start](#where-to-start) -- [Where to start (Windows)](#where-to-start-windows) - [Projects](#projects) - - [Container Operations](#container-operations) - - [Container Composition](#container-composition) - - [Deployment and Infrastructure](#deployment-and-infrastructure) - - [Monitoring](#monitoring) - - [Networking](#networking) - - [Orchestration](#orchestration) - - [PaaS](#paas) - - [Reverse Proxy](#reverse-proxy) - - [Runtime](#runtime) + - [Engine \& Runtime](#engine--runtime) + - [Building Images](#building-images) + - [Builder](#builder) + - [Base Images](#base-images) + - [Dockerfile](#dockerfile) + - [Linter](#linter) + - [Image Lifecycle](#image-lifecycle) + - [Registry](#registry) + - [Registry CLI](#registry-cli) + - [Image Scanning \& SBOM](#image-scanning--sbom) + - [Supply Chain](#supply-chain) + - [Running Containers](#running-containers) + - [Composition](#composition) + - [Orchestration](#orchestration) + - [Deployment \& Platforms](#deployment--platforms) + - [Garbage Collection](#garbage-collection) + - [Networking \& Proxies](#networking--proxies) + - [Networking](#networking) + - [Reverse Proxy](#reverse-proxy) + - [Storage \& Data](#storage--data) + - [Observability](#observability) - [Security](#security) - - [Service Discovery](#service-discovery) - - [Volume Management / Data](#volume-management--data) - - [User Interface](#user-interface) - - [Desktop](#desktop) - - [Terminal](#terminal) - - [Terminal UI](#terminal-ui) - - [CLI tools](#cli-tools) - - [Other](#other) - - [Web](#web) - - [Docker Images](#docker-images) - - [Base Tools](#base-tools) - - [Builder](#builder) - - [Dockerfile](#dockerfile) - - [Linter](#linter) - - [Metadata](#metadata) - - [Registry](#registry) - - [Development with Docker](#development-with-docker) - - [API Client](#api-client) - - [CI/CD](#cicd) - - [Development Environment](#development-environment) - - [Garbage Collection](#garbage-collection) - - [Serverless](#serverless) - - [Testing](#testing) - - [Wrappers](#wrappers) - - [Services based on Docker (:heavy_dollar_sign:)](#services-based-on-docker-heavy_dollar_sign) - - [CI Services](#ci-services) - - [CaaS](#caas) - - [Monitoring Services](#monitoring-services) -- [Useful Resources](#useful-resources) - - [Awesome Lists](#awesome-lists) - - [Demos and Examples](#demos-and-examples) - - [Good Tips](#good-tips) - - [Raspberry Pi & ARM](#raspberry-pi--arm) - - [Security](#security-1) - - [Videos](#videos) -- [Communities and Meetups](#communities-and-meetups) - - [Brazilian](#brazilian) - - [Chinese](#chinese) - - [English](#english) - - [Russian](#russian) - - [Spanish](#spanish) - - [Stargazers over time](#stargazers-over-time) + - [User Interfaces](#user-interfaces) + - [Desktop](#desktop) + - [Terminal](#terminal) + - [Web](#web) + - [IDE Integrations](#ide-integrations) + - [Developer Workflow](#developer-workflow) + - [API Client](#api-client) + - [CI/CD](#cicd) + - [Development Environment](#development-environment) + - [Serverless](#serverless) + - [Testing](#testing) + - [Wrappers](#wrappers) + - [In-Container Tooling](#in-container-tooling) +- [Learning Resources](#learning-resources) + - [Where to Start](#where-to-start) + - [Where to Start (Windows)](#where-to-start-windows) + - [Books \& Tutorials](#books--tutorials) + - [Awesome Lists](#awesome-lists) + - [Demos and Examples](#demos-and-examples) + - [Good Tips](#good-tips) + - [Raspberry Pi \& ARM](#raspberry-pi--arm) + - [Security Articles](#security-articles) + - [Videos](#videos) + - [Communities and Meetups](#communities-and-meetups) + - [Brazilian](#brazilian) + - [English](#english) + - [Russian](#russian) + - [Spanish](#spanish) +- [Stargazers over time](#stargazers-over-time) -# Legend +# Projects -- Abandoned :skull: -- Beta :construction: -- Monetized :heavy_dollar_sign: +## Official Projects -# What is Docker +- [Moby](https://github.com/moby/moby) +- [Docker Hub](https://hub.docker.com) +- [Docker Compose](https://github.com/docker/compose/) - Define and run multi-container applications with Docker. +- [Docker Registry][distribution] - The Docker toolset to pack, ship, store, and deliver content -> Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud. +## Engine & Runtime -_Source:_ [What is Docker](https://www.docker.com/why-docker) +- [colima](https://github.com/abiosoft/colima) - Container runtimes on macOS (and Linux) with minimal setup. +- [containerd](https://github.com/containerd/containerd) - An open and reliable container runtime. +- [cri-o](https://github.com/cri-o/cri-o) - Open Container Initiative-based implementation of Kubernetes Container Runtime Interface. +- [gVisor](https://github.com/google/gvisor) - Application Kernel for Containers. +- [lxc](https://github.com/lxc/lxc) - LXC - Linux Containers. +- [Mocker](https://github.com/us/mocker) - Docker-compatible container CLI for macOS, built on Apple's Containerization framework. +- [podman](https://github.com/containers/libpod) - Libpod is a library used to create container pods. Home of Podman. +- [runc](https://github.com/opencontainers/runc) - CLI tool for spawning and running containers according to the OCI specification. +- [runtime-tools](https://github.com/opencontainers/runtime-tools) - Oci-runtime-tool is a collection of tools for working with the OCI runtime specification. +- [youki](https://github.com/youki-dev/youki) - Container runtime written in Rust, implementing the OCI runtime specification. -# Where to start +## Building Images -- [Benefits of using Docker](https://semaphoreci.com/blog/docker-benefits) for development and delivery, with a practical roadmap for adoption. -- [Bootstrapping Microservices](https://www.manning.com/books/bootstrapping-microservices-with-docker-kubernetes-and-terraform) by [Ashley Davis](https://twitter.com/ashleydavis75) - A practical and project-based guide to building applications with microservices, starts by building a Docker image for a single microservice and publishing it to a private container registry, finishes by deploying a complete microservices application to a production Kubernetes cluster. -- [Docker Curriculum](https://github.com/prakhar1989/docker-curriculum): A comprehensive tutorial for getting started with Docker. Teaches how to use Docker and deploy dockerized apps on AWS with Elastic Beanstalk and Elastic Container Service. -- [Docker Documentation](https://docs.docker.com/): the official documentation. -- [Docker for beginners](https://github.com/groda/big_data/blob/master/docker_for_beginners.md): A tutorial for beginners who need to learn the basics of Docker—from "Hello world!" to basic interactions with containers, with simple explanations of the underlying concepts. -- [Docker for novices](https://www.youtube.com/watch?v=xsjSadjKXns) An introduction to Docker for developers and testers who have never used it. (Video 1h40, recorded linux.conf.au 2019 — Christchurch, New Zealand) by Alex Clews. -- [Docker Training](https://training.mirantis.com) :heavy_dollar_sign: -- [Docker Tutorial for Beginners (Updated 2019 version)](https://hashnode.com/post/docker-tutorial-for-beginners-cjrj2hg5001s2ufs1nker9he2) — In this Docker tutorial, you'll learn all the basics and learn how you can containerize Node.js and Go applications. Even if you aren't familiar with these languages it should be easy for you to follow this tutorial and use any other language. -- [Katacoda](https://www.katacoda.com/courses/docker): Learn Docker using Interactive Browser-Based Labs -- [Learn Docker](https://github.com/dwyl/learn-docker): step-by-step tutorial and more resources (video, articles, cheat sheets) by [@dwyl](https://github.com/dwyl) -- [Play With Docker](https://training.play-with-docker.com/): PWD is a great way to get started with Docker from beginner to advanced users. Docker runs directly in your browser. -- [Practical Guide about Docker Commands in Spanish](https://github.com/brunocascio/docker-espanol) This spanish guide contains the use of basic docker commands with real life examples. -- [Practical Introduction to Container Terminology](https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction) The landscape for container technologies is larger than just docker. Without a good handle on the terminology, It can be difficult to grasp the key differences between docker and (pick your favorites, CRI-O, rkt, lxc/lxd) or understand what the Open Container Initiative is doing to standardize container technology. -- [The Docker Handbook](https://docker-handbook.farhan.dev/) An open-source book that teaches you the fundamentals, best practices and some intermediate Docker functionalities. The book is hosted on [fhsinchy/the-docker-handbook](https://github.com/fhsinchy/the-docker-handbook) and the projects are hosted on [fhsinchy/docker-handbook-projects](https://github.com/fhsinchy/docker-handbook-projects) repository. - -**Cheatsheets** by - -- [@eon01](https://github.com/eon01/DockerCheatSheet) -- [@dimonomid](https://github.com/dimonomid/docker-quick-ref) (PDF) -- [@JensPiegsa](https://github.com/JensPiegsa/docker-cheat-sheet) -- [@wsargent](https://github.com/wsargent/docker-cheat-sheet) (Most popular) - -# Where to start (Windows) +### Builder -- [A Comparative Study of Docker Engine on Windows Server vs Linux Platform](https://collabnix.com/a-comparative-study-of-docker-engine-on-windows-server-vs-linux-platform/) Comparing the feature sets and implementations of Docker on Windows and Linux -- [Build And Run Your First Docker Windows Server Container](https://www.docker.com/blog/build-your-first-docker-windows-server-container/) Walkthrough installing Docker on Windows 10, building a Docker image and running a Windows container -- [Docker on Windows behind a firewall](https://toedter.com/2015/05/11/docker-on-windows-behind-a-firewall/) by [@kaitoedter](https://twitter.com/kaitoedter) -- [Docker Quick Tutorial](https://vegibit.com/docker-quick-tutorial/) Introduces you to the official Getting Started Tutorial using Windows 10 and Hyper-V. -- [Docker Reference Architecture: Modernizing Traditional .NET Framework Applications](https://success.mirantis.com/article/modernizing-traditional-dot-net-applications) - You will learn to identify the types of .NET Framework applications that are good candidates for containerization, the "lift-and-shift" approach to containerization. -- [Docker with Microsoft SQL 2016 + ASP.NET](https://blog.alexellis.io/docker-does-sql2016-aspnet/) Demonstration running ASP.NET and SQL Server workloads in Docker -- [Exploring ASP.NET Core with Docker in both Linux and Windows Containers](https://www.hanselman.com/blog/exploring-aspnet-core-with-docker-in-both-linux-and-windows-containers) Running ASP.NET Core apps in Linux and Windows containers, using [Docker for Windows][docker-for-windows] -- [Running a Legacy ASP.NET App in a Windows Container](https://blog.sixeyed.com/dockerizing-nerd-dinner-part-1-running-a-legacy-asp-net-app-in-a-windows-container/) Steps for Dockerizing a legacy ASP.NET app and running as a Windows container -- [Windows Containers and Docker: The 101](https://www.youtube.com/watch?v=N7SG2wEyQtM) :movie_camera: - A 20-minute overview, using Docker to run PowerShell, ASP.NET Core and ASP.NET apps -- [Windows Containers Quick Start](https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/) Overview of Windows containers, drilling down to Quick Starts for Windows 10 and Windows Server 2016 +Applications designed to help or simplify building **new** images ---- +- [ansible-bender](https://github.com/ansible-community/ansible-bender) - A tool utilising `ansible` and `buildah`. +- [apko](https://github.com/chainguard-dev/apko) - Declarative OCI image builder from apk packages; reproducible by design. +- [buildah](https://github.com/containers/buildah) - A tool that facilitates building OCI images. +- [BuildKit](https://github.com/moby/buildkit) - Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit. +- [buildx](https://github.com/docker/buildx) - Official Docker CLI plugin for multi-platform builds backed by BuildKit. +- [cekit](https://github.com/cekit/cekit) - A tool used by openshift to build base images using different build engines. +- [dlayer](https://github.com/orisano/dlayer) - Docker layer analyzer. +- [docker-companion](https://github.com/mudler/docker-companion) - A command line tool written in Golang to squash and unpack docker images. +- [docker-repack](https://github.com/orf/docker-repack) - Repacks a Docker image into a smaller, more efficient version that makes it significantly faster to pull. +- [DockerSlim](https://github.com/docker-slim/docker-slim) shrinks fat Docker images creating the smallest possible images. +- [earthly](https://github.com/earthly/earthly) - Containerized build automation with Dockerfile-meets-Makefile syntax. +- [essex](https://github.com/utensils/essex) - Boilerplate for Docker Based Projects: Essex is a CLI utility written in bash to quickly setup clean and consistent Docker projects with Makefile driven workflows. +- [HPC Container Maker](https://github.com/NVIDIA/hpc-container-maker) - Generates Dockerfiles from a high level Python recipe, including building blocks for High-Performance Computing components. +- [img](https://github.com/genuinetools/img) - Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. +- [ko](https://github.com/ko-build/ko) - Build and deploy Go applications as container images without a Dockerfile. +- [nix2container](https://github.com/nlewo/nix2container) - Build OCI images with Nix without `docker load` round-trips. +- [packer](https://developer.hashicorp.com/packer/integrations/hashicorp/docker/latest/components/builder/docker) - Hashicorp tool to build machine images including docker image integrated with configuration management tools like chef, puppet, ansible. +- [Production-Ready Python Containers](https://pythonspeed.com/products/pythoncontainer/) - :yen: A template for creating production-ready Docker images for Python applications. +- [RAUDI](https://github.com/cybersecsi/RAUDI) - A tool to automatically update (and optionally push to Docker Hub) Docker Images for 3rd party software whenever theres is a new release/update/commit. +- [runlike](https://github.com/lavie/runlike) - Generate `docker run`command and options from running containers. +- [Whaler](https://github.com/P3GLEG/Whaler) - Program to reverse Docker images into Dockerfiles. -# Projects -- Moby = open source development -- Docker CE = free product release based on Moby -- Docker EE = commercial product release based on Docker CE. +### Base Images -> Docker EE is on the same code base as Docker CE, so also built from Moby, with commercial components added, such as "docker data center / universal control plane" +Minimal, hardened, or purpose-built container base images. -- [Moby](https://github.com/moby/moby) -- [Docker Images](https://hub.docker.com) -- [Docker Compose](https://github.com/docker/compose/) (Define and run multi-container applications with Docker) -- [Docker Machine](https://github.com/docker/machine) (Machine management for a container-centric world) -- [Docker Registry][distribution] (The Docker toolset to pack, ship, store, and deliver content) -- [Docker Swarm](https://github.com/docker/swarm) (Swarm: a Docker-native clustering system) - -## Container Operations - -### Container Composition - -- [bocker](https://github.com/icy/bocker) (2) :skull: - Write Dockerfile completely in Bash. Extensible and simple. --> Reusable by [@icy](https://github.com/icy) -- [bocker](https://github.com/p8952/bocker) (1) :skull: - Docker implemented in 100 lines of bash by [p8952](https://github.com/p8952) -- [box](https://github.com/box-builder/box) - Build Dockerfile images with a mruby DSL, includes flattening and layer manipulation -- [Capitan](https://github.com/byrnedo/capitan) - Composable docker orchestration with added scripting support by [@byrnedo]. -- [compose_plantuml](https://github.com/funkwerk/compose_plantuml) :skull: - Generate Plantuml graphs from docker-compose files by [@funkwerk](https://github.com/funkwerk) -- [Composerize](https://github.com/magicmark/composerize) - Convert docker run commands into docker-compose files -- [crowdr](https://github.com/polonskiy/crowdr) - Tool for managing multiple Docker containers (`docker-compose` alternative) by [@polonskiy](https://github.com/polonskiy/) -- [docker-compose-graphviz](https://github.com/abesto/docker-compose-graphviz) :skull: - Turn a docker-compose.yml files into Graphviz .dot files by [@abesto](https://github.com/abesto) -- [docker-config-update](https://github.com/sudo-bmitch/docker-config-update) - Utility to update docker configs and secrets for deploying in a compose file by [@sudo-bmitch](https://github.com/sudo-bmitch) -- [draw-compose](https://github.com/Alexis-benoist/draw-compose) :skull: - Utility to draw a schema of a docker compose by [@Alexis-benoist](https://github.com/Alexis-benoist) -- [elsy](https://github.com/cisco/elsy) - An opinionated, multi-language, build tool based on Docker and Docker Compose -- [habitus](https://github.com/cloud66-oss/habitus) - A Build Flow Tool for Docker by [@cloud66](https://github.com/cloud66) -- [kompose](https://github.com/kubernetes/kompose) - Go from Docker Compose to Kubernetes -- [Maestro](https://github.com/toscanini/maestro) :skull: - Maestro provides the ability to easily launch, orchestrate and manage multiple Docker containers as single unit by [@tascanini](https://github.com/toscanini) -- [percheron](https://github.com/ashmckenzie/percheron) :skull: - Organise your Docker containers with muscle and intelligence by [@ashmckenzie](https://github.com/ashmckenzie) -- [plash](https://github.com/ihucos/plash) - A container run and build engine - runs inside docker. -- [podman-compose](https://github.com/containers/podman-compose) - a script to run docker-compose.yml using podman by [@containers][containers] -- [rocker-compose](https://github.com/grammarly/rocker-compose) :skull: - Docker composition tool with idempotency features for deploying apps composed of multiple containers. By[@grammarly](grammarly). -- [rocker](https://github.com/grammarly/rocker) :skull: - Extended Dockerfile builder. Supports multiple FROMs, MOUNTS, templates, etc. by [@grammarly](grammarly). -- [Smalte](https://github.com/roquie/smalte) – Dynamically configure applications that require static configuration in docker container. By [@roquie](https://github.com/roquie) -- [Stacker](https://github.com/stacker/stacker-cli) - Docker Compose Templates. Stacker provides an abstraction layer over Docker Compose and a better DX (developer experience). -- [Stitchocker](https://github.com/alexaandrov/stitchocker) - A lightweight and fast command line utility for conveniently grouping your docker-compose multiple container services. By [@alexaandrov](https://github.com/alexaandrov) -- [Zodiac](https://github.com/CenturyLinkLabs/zodiac) :skull: - A lightweight tool for easy deployment and rollback of dockerized applications. By [@CenturyLinkLabs][centurylinklabs] - -### Deployment and Infrastructure - -- [awesome-stacks](https://github.com/ethibox/awesome-stacks) - Deploy 80+ open-source web apps with one Docker command -- [blackfish](https://gitlab.com/blackfish/blackfish) - a CoreOS VM to build swarm clusters for Dev & Production by [@blackfish](https://gitlab.com/blackfish/) -- [BosnD](https://gitlab.com/n0r1sk/bosnd) - BosnD, the boatswain daemon - A dynamic configuration file writer & service reloader for dynamically changing container environments. -- [Centurion](https://github.com/newrelic/centurion) - Centurion is a mass deployment tool for Docker fleets. It takes containers from a Docker registry and runs them on a fleet of hosts with the correct environment variables, host volume mappings, and port mappings. By [@newrelic](https://github.com/newrelic) -- [Clocker](https://github.com/brooklyncentral/clocker) - Clocker creates and manages a Docker cloud infrastructure. Clocker supports single-click deployments and runtime management of multi-node applications that run as containers distributed across multiple hosts, on both Docker and Marathon. It leverages [Calico][calico] and [Weave][weave] for networking and [Brooklyn](https://brooklyn.apache.org/) for application blueprints. By [@brooklyncentral](https://github.com/brooklyncentral) -- [Conduit](https://github.com/ehazlett/conduit) - Experimental deployment system for Docker by [@ehazlett](https://github.com/ehazlett) -- [depcon](https://github.com/ContainX/depcon) - Depcon is written in Go and allows you to easily deploy Docker containers to Apache Mesos/Marathon, Amazon ECS and Kubernetes. By [@ContainX][containx] -- [deploy](https://github.com/ttiny/deploy) :skull: - Git and Docker deployment tool. A middle ground between simple Docker composition tools and full blown cluster orchestration by [@ttiny](https://github.com/ttiny) -- [dockit](https://github.com/humblec/dockit) :skull: - Do docker actions and Deploy gluster containers! By [@humblec](https://github.com/humblec) -- [gitkube](https://github.com/hasura/gitkube) - Gitkube is a tool for building and deploying docker images on Kubernetes using `git push`. By [@Hasura](https://github.com/hasura/). -- [Grafeas](https://github.com/grafeas/grafeas) - A common API for metadata about containers, from image and build details to security vulnerabilities. By [grafeas](https://github.com/grafeas) -- [Longshoreman](https://github.com/longshoreman/longshoreman) :skull: - Longshoreman automates application deployment using Docker. Just create a Docker repository (or use a service), configure the cluster using AWS or Digital Ocean (or whatever you like) and deploy applications using a Heroku-like CLI tool. By [longshoreman](https://github.com/longshoreman) -- [SwarmManagement](https://github.com/DIPSAS/SwarmManagement) - Swarm Management is a python application, installed with pip. The application makes it easy to manage a Docker Swarm by configuring a single yaml file describing which stacks to deploy, and which networks, configs or secrets to create. -- [werf](https://github.com/werf/werf) - werf is a CI/CD tool for building Docker images efficiently and deploying them to Kubernetes using GitOps by [@flant](https://github.com/flant) - -### Monitoring +- [Chainguard Images](https://github.com/chainguard-images/images) - Minimal, signed, SBOM-attested container images built on Wolfi. +- [distroless](https://github.com/GoogleContainerTools/distroless) - Language focused docker images, minus the operating system. +- [melange](https://github.com/chainguard-dev/melange) - Build apk packages from declarative YAML for use with apko. +- [pglayers](https://github.com/pglayers/pglayers) - Pre-built PostgreSQL extensions as composable Docker layers. 50+ extensions, ready-to-use combined images (full, Azure-compatible). +- [Wolfi](https://github.com/wolfi-dev/os) - Undistro Linux designed for containers; glibc-based, signed, daily SBOMs. -- [Autoheal](https://github.com/willfarrell/docker-autoheal) - Monitor and restart unhealthy docker containers automatically. -- [Axibase Collector](https://github.com/axibase/atsd-use-cases/tree/master/integrations/docker) - Axibase Collector streams performance counters, configuration changes and lifecycle events from the Docker engine(s) into Axibase Time Series Database for roll-up dashboards and integration with upstream monitoring systems. -- [cAdvisor](https://github.com/google/cadvisor) - Analyzes resource usage and performance characteristics of running containers. Created by [@Google][google] -- [Docker-Alertd](https://github.com/deltaskelta/docker-alertd) - Monitor and send alerts based on docker container resource usage/statistics -- [Docker-Flow-Monitor](https://github.com/docker-flow/docker-flow-monitor) - Reconfigures Prometheus when a new service is updated or deployed automatically by [@docker-flow][docker-flow] -- [Dockerana](https://github.com/dockerana/dockerana) :skull: - packaged version of Graphite and Grafana, specifically targeted at metrics from Docker. -- [DockProc](https://gitlab.com/n0r1sk/dockproc) - I/O monitoring for containers on processlevel. -- [dockprom](https://github.com/stefanprodan/dockprom) - Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager by [@stefanprodan](https://github.com/stefanprodan) -- [Dozzle](https://github.com/amir20/dozzle) - Monitor container logs in real-time with a browser or mobile device. [@amir20](https://github.com/amir20) -- [Dynatrace](https://www.dynatrace.com/technologies/docker-monitoring/) :heavy_dollar_sign: - Monitor containerized applications without installing agents or modifying your Run commands -- [Glances](https://github.com/nicolargo/glances) - A cross-platform curses-based system monitoring tool written in Python by [@nicolargo](https://github.com/nicolargo) -- [Grafana Docker Dashboard Template](https://grafana.com/grafana/dashboards/179) - A template for your Docker, Grafana and Prometheus stack [@vegasbrianc][vegasbrianc] -- [InfluxDB, cAdvisor, Grafana](https://github.com/vegasbrianc/docker-monitoring) - InfluxDB Time series DB in combination with Grafana and cAdvisor by [@vegasbrianc][vegasbrianc] -- [LogJam](https://github.com/gocardless/logjam) - Logjam is a log forwarder designed to listen on a local port, receive log entries over UDP, and forward these messages on to a log collection server (such as logstash) by [@gocardless](https://github.com/gocardless) -- [Logspout](https://github.com/gliderlabs/logspout) - Log routing for Docker container logs by [@gliderlabs][gliderlabs] -- [monit-docker](https://github.com/decryptus/monit-docker) - Monitor docker containers resources usage or status and execute docker commands or inside containers. [@decryptus][decryptus] -- [NexClipper](https://github.com/NexClipper/NexClipper) - NexClipper is the container monitoring and performance management solution specialized in Docker, Apache Mesos, Marathon, DC/OS, Mesosphere, Kubernetes by [@Nexclipper](https://github.com/NexClipper) -- [Out-of-the-box Host/Container Monitoring/Logging/Alerting Stack](https://github.com/uschtwill/docker_monitoring_logging_alerting) - Docker host and container monitoring, logging and alerting out of the box using cAdvisor, Prometheus, Grafana for monitoring, Elasticsearch, Kibana and Logstash for logging and elastalert and Alertmanager for alerting. Set up in 5 Minutes. Secure mode for production use with built-in [Automated Nginx Reverse Proxy (jwilder's)][nginxproxy]. -- [SuperVisor CPM](https://t0xic0der.medium.com/simply-accessible-container-performance-monitoring-with-supervisor-7fb47f925f3b) [Frontend Service](https://github.com/t0xic0der/supervisor-frontend-service/) and [Driver Service](https://github.com/t0xic0der/supervisor-driver-service/) :construction: - A simple and accessible FOSS container performance monitoring service written in Python by [@t0xic0der](https://github.com/t0xic0der/) -- [SwarmAlert](https://github.com/gpulido/SwarmAlert) - Monitors a Docker Swarm and sends Pushover alerts when it finds a container with no healthy service task running. -- [Zabbix Docker module](https://github.com/monitoringartist/Zabbix-Docker-Monitoring) - Zabbix module that provides discovery of running containers, CPU/memory/blk IO/net container metrics. Systemd Docker and LXC execution driver is also supported. It's a dynamically linked shared object library, so its performance is (~10x) better, than any script solution. -- [Zabbix Docker](https://github.com/gomex/docker-zabbix) - Monitor containers automatically using zabbix LLD feature. -### Networking +### Dockerfile -- [Calico-Docker][calico] - Calico is a pure layer 3 virtual network that allows containers over multiple docker-hosts to talk to each other. -- [Flannel](https://github.com/coreos/flannel/) - Flannel is a virtual network that gives a subnet to each host for use with container runtimes. By [@coreos][coreos] -- [Freeflow](https://github.com/Microsoft/Freeflow) - High performance container overlay networks on Linux. Enabling RDMA (on both InfiniBand and RoCE) and accelerating TCP to bare metal performance. By [@Microsoft](https://github.com/Microsoft) -- [netshoot](https://github.com/nicolaka/netshoot) - The netshoot container has a powerful set of networking tools to help troubleshoot Docker networking issues by [@nicolaka](https://github.com/nicolaka) -- [Pipework](https://github.com/jpetazzo/pipework) - Software-Defined Networking for Linux Containers, Pipework works with "plain" LXC containers, and with the awesome Docker. By [@jpetazzo][jpetazzo] -- [Weave][weave] (The Docker network) - Weave creates a virtual network that connects Docker containers deployed across multiple hosts. +- [Dockerfile Generator](https://github.com/ozankasikci/dockerfile-generator) `dfg` is both a Go library and an executable that produces valid Dockerfiles using various input channels. +- [Dockershelf](https://github.com/Dockershelf/dockershelf) - A repository that serves as a collector for docker recipes that are universal, efficient and slim. Images are updated, tested and published daily via a Travis cron job. +- [Dofigen](https://github.com/lenra-io/dofigen) - A Dockerfile generator using a simplified description in YAML or JSON format. +- [Trsuted Builds](https://dockerfile.github.io/) - Trusted Automated Docker Builds. Dockerfile Project maintains a central repository of Dockerfile for various popular open source software services runnable on a Docker container. -### Orchestration +### Linter -- [athena](https://github.com/athena-oss/athena) - An automation platform with a plugin architecture that allows you to easily create and share services. -- [blimp](https://github.com/tubesandlube/blimp) :skull: - Uses Docker Machine to easily move a container from one Docker host to another, show containers running against all of your hosts, replicate a container across multiple hosts and more by [@defermat](https://github.com/defermat) and [@schvin](https://github.com/schvin) -- [CloudSlang](https://github.com/CloudSlang/cloud-slang) - CloudSlang is a workflow engine to create Docker process automation -- [clusterdock](https://github.com/clusterdock/clusterdock) - Docker container orchestration to enable the testing of long-running cluster deployments -- [Crane](https://github.com/Dataman-Cloud/crane) - Control plane based on docker built-in swarm [@Dataman-Cloud](https://github.com/Dataman-Cloud) -- [Docker Flow Swarm Listener](https://github.com/docker-flow/docker-flow-swarm-listener) - Docker Flow Swarm Listener project is to listen to Docker Swarm events and send requests when a change occurs. By [@docker-flow][docker-flow] -- [gantryd](https://github.com/DevTable/gantryd) :skull: - A framework for easy management of docker-based components across machines by [@DevTable](https://github.com/DevTable) -- [Haven](https://github.com/codeabovelab/haven-platform) - Haven is a simplified container management platform that integrates container, application, cluster, image, and registry managements. By [@codeabovelab](https://github.com/codeabovelab) -- [Helios](https://github.com/spotify/helios) :skull: - A simple platform for deploying and managing containers across an entire fleet of servers by [@spotify][spotify] -- [Kontena](https://github.com/kontena/kontena) :skull: - The developer friendly container and micro services platform. Works on any cloud, easy to setup, simple to use. -- [Kubernetes](https://github.com/kubernetes/kubernetes) - Open source orchestration system for Docker containers by Google -- [ManageIQ](https://github.com/ManageIQ/manageiq) - Discover, optimize and control your hybrid IT. By [ManageIQ](https://github.com/ManageIQ) -- [Mantl](https://github.com/mantl/mantl) - Mantl is a modern platform for rapidly deploying globally distributed services -- [Marathon](https://github.com/mesosphere/marathon) - Marathon is a private PaaS built on Mesos. It automatically handles hardware or software failures and ensures that an app is "always on" -- [Mesos](https://github.com/apache/mesos) - Resource/Job scheduler for containers, VM's and physical hosts [@apache](https://mesos.apache.org/) -- [Nebula](https://github.com/nebula-orchestrator) - A Docker orchestration tool designed to manage massive scale distributed clusters. -- [Nomad](https://github.com/hashicorp/nomad) - Easily deploy applications at any scale. A Distributed, Highly Available, Datacenter-Aware Scheduler by [@hashicorp](https://github.com/hashicorp) -- [Panamax](https://github.com/CenturyLinkLabs/panamax-ui) :skull: - An open-source project that makes deploying complex containerized apps as easy as Drag-and-Drop by [@CenturyLinkLabs][centurylinklabs]. -- [Rancher](https://github.com/rancher/rancher) - An open source project that provides a complete platform for operating Docker in production by [@rancher][rancher]. -- [Swarm-cronjob](https://github.com/crazy-max/swarm-cronjob) - Create jobs on a time-based schedule on Swarm by [@crazy-max](crazy-max) +- [Dockadvisor](https://github.com/deckrun/dockadvisor) - Lightweight Dockerfile linter with 60+ rules, quality scoring, and security checks. +- [docker-image-size-limit](https://github.com/wemake-services/docker-image-size-limit) - A tool to keep an eye on your docker images size. +- [Hadolint](https://github.com/hadolint/hadolint) - A Dockerfile linter that checks for best practices, common mistakes, and is also able to lint any bash written in `RUN` instructions;. -### PaaS +## Image Lifecycle -- [Atlantis](https://github.com/ooyala/atlantis) :skull: - Atlantis is an Open Source PaaS for HTTP applications built on Docker and written in Go -- [caprover](https://github.com/caprover/caprover) - [previously known as CaptainDuckDuck] Automated Scalable Webserver Package (automated Docker+nginx) - Heroku on Steroids -- [Convox Rack](https://github.com/convox/rack) - Convox Rack is open source PaaS built on top of expert infrastructure automation and devops best practices. -- [Dcw](https://github.com/pbertera/dcw) - Docker-compose SSH wrapper: a very poor man PaaS, exposing the docker-compose and custom-container commands defined in container labels. -- [Dokku](https://github.com/dokku/dokku) - Docker powered mini-Heroku that helps you build and manage the lifecycle of applications (originally by [@progrium][progrium]) -- [Empire](https://github.com/remind101/empire) - A PaaS built on top of Amazon EC2 Container Service (ECS) -- [Exoframe](https://github.com/exoframejs/exoframe) - A self-hosted tool that allows simple one-command deployments using Docker -- [Flynn](https://github.com/flynn/flynn) - A next generation open source platform as a service -- [Hephy Workflow](https://github.com/teamhephy/workflow) - Open source PaaS for Kubernetes that adds a developer-friendly layer to any Kubernetes cluster, making it easy to deploy and manage applications. Fork of [Deis Workflow](https://github.com/deis/workflow) -- [Krane](https://github.com/krane/krane) - Toolset for managing container workloads on remote servers -- [Nanobox](https://github.com/nanobox-io/nanobox) :heavy_dollar_sign: - An application development platform that creates local environments that can then be deployed and scaled in the cloud. -- [OpenShift][openshift] - An open source PaaS built on [Kubernetes][kubernetes] and optimized for Dockerized app development and deployment by [Red Hat](https://www.redhat.com/en) -- [Tsuru](https://github.com/tsuru/tsuru) - Tsuru is an extensible and open source Platform as a Service software +### Registry -### Reverse Proxy +Services to securely store your Docker images. -- [bunkerized-nginx](https://github.com/bunkerity/bunkerized-nginx) - Web app hosting and reverse proxy secure by default. By [@bunkerity](https://github.com/bunkerity) -- [Docker Dnsmasq Updater](https://github.com/moonbuggy/docker-dnsmasq-updater) - Update a remote dnsmasq server with Docker container hostnames. -- [docker-flow-proxy](https://github.com/docker-flow/docker-flow-proxy) - Reconfigures proxy every time a new service is deployed, or when a service is scaled. By [@docker-flow][docker-flow] -- [docker-proxy](https://github.com/silarsis/docker-proxy) :skull: - Transparent proxy for docker containers, run in a docker container. By [@silarsis](https://github.com/silarsis) -- [fabio](https://github.com/fabiolb/fabio) - A fast, modern, zero-conf load balancing HTTP(S) router for deploying microservices managed by consul. By [@magiconair](https://github.com/magiconair) (Frank Schroeder) -- [h2o-proxy](https://github.com/zchee/h2o-proxy) :skull: - Automated H2O reverse proxy for Docker containers. An alternative to [jwilder/nginx-proxy][nginxproxy] by [@zchee](https://github.com/zchee) -- [Let's Encrypt Nginx-proxy Companion](https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion) - A lightweight companion container for the nginx-proxy. It allow the creation/renewal of Let's Encrypt certificates automatically. By [@JrCs](https://github.com/JrCs) -- [muguet](https://github.com/mattallty/muguet) :skull: - DNS Server & Reverse proxy for Docker environments. By [@mattallty](https://github.com/mattallty) -- [Nginx Proxy Manager](https://github.com/jc21/nginx-proxy-manager) - A beautiful web interface for proxying web based services with SSL. By [@jc21](https://github.com/jc21) -- [nginx-proxy][nginxproxy] - Automated nginx proxy for Docker containers using docker-gen by [@jwilder][jwilder] -- [Swarm Ingress Router](https://github.com/tpbowden/swarm-ingress-router) :skull: - Route DNS names to Swarm services based on labels. By [@tpbowden](https://github.com/tpbowden/) -- [Swarm Router](https://github.com/flavioaiello/swarm-router) - A «zero config» service name based router for docker swarm mode with a fresh and more secure approach. By [@flavioaiello](https://twitter.com/flavioaiello) -- [Træfɪk](https://github.com/containous/traefik) - Automated reverse proxy and load-balancer for Docker, Mesos, Consul, Etcd... By [@EmileVauge](https://github.com/emilevauge) - -### Runtime - -- [aind](https://github.com/aind-containers/aind) - AinD launches Android apps in Docker, by nesting Anbox containers inside Docker by [@aind-containers](https://github.com/aind-containers) -- [cri-o](https://github.com/cri-o/cri-o) - Open Container Initiative-based implementation of Kubernetes Container Runtime Interface by [cri-o](https://github.com/cri-o) -- [lxc](https://github.com/lxc/lxc) - LXC - Linux Containers -- [podman](https://github.com/containers/libpod) - libpod is a library used to create container pods. Home of Podman by [@containers][containers] -- [rlxc](https://github.com/brauner/rlxc) - LXC binary written in Rust by [@brauner](https://github.com/brauner) -- [runtime-tools](https://github.com/opencontainers/runtime-tools) - oci-runtime-tool is a collection of tools for working with the OCI runtime specification by [@opencontainers](https://github.com/opencontainers) - -### Security - -- [Anchor Engine](https://github.com/anchore/anchore) - Analyze images for CVE vulnerabilities and against custom security policies by [@Anchor](https://github.com/anchore) -- [Aqua Security](https://www.aquasec.com) :heavy_dollar_sign: - Securing container-based applications from Dev to Production on any platform -- [bane](https://github.com/genuinetools/bane) - AppArmor profile generator for Docker containers by [@genuinetools][genuinetools] -- [CIS Docker Benchmark](https://github.com/dev-sec/cis-docker-benchmark) - This [InSpec][inspec] compliance profile implement the CIS Docker 1.12.0 Benchmark in an automated way to provide security best-practice tests around Docker daemon and containers in a production environment. By [@dev-sec](https://github.com/dev-sec) -- [Clair](https://github.com/quay/clair) - Clair is an open source project for the static analysis of vulnerabilities in appc and docker containers. By [@coreos][coreos] -- [Dagda](https://github.com/eliasgranderubio/dagda) - Dagda is a tool to perform static analysis of known vulnerabilities, trojans, viruses, malware & other malicious threats in docker images/containers and to monitor the docker daemon and running docker containers for detecting anomalous activities. By [@eliasgranderubio](https://github.com/eliasgranderubio) -- [Deepfence Enterprise](https://deepfence.io) :heavy_dollar_sign: - Full life cycle Cloud Native Workload Protection platform for kubernetes, virtual machines and serverless. By [@deepfence](deepfence) -- [Deepfence Threat Mapper](https://github.com/deepfence/ThreatMapper) - Powerful runtime vulnerability scanner for kubernetes, virtual machines and serverless. By [@deepfence](deepfence) -- [docker-bench-security](https://github.com/docker/docker-bench-security) - script that checks for dozens of common best-practices around deploying Docker containers in production. By [@docker][docker] -- [docker-explorer](https://github.com/google/docker-explorer) - A tool to help forensicate offline docker acquisitions by [@Google][google] -- [docker-lock](https://github.com/safe-waters/docker-lock) - A cli-plugin for docker to automatically manage image digests by tracking them in a separate Lockfile. By [@safe-waters][safe-waters] -- [KICS](https://github.com/checkmarx/kics) - an infrastructure-as-code scanning tool, find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle. Can be extended for additional policies. By [Checkmarx](https://github.com/Checkmarx) -- [notary](https://github.com/theupdateframework/notary) - a server and a client for running and interacting with trusted collections. By [@TUF](https://github.com/theupdateframework) -- [oscap-docker](https://github.com/OpenSCAP/openscap) - OpenSCAP provides oscap-docker tool which is used to scan Docker containers and images. By [OpenSCAP](https://github.com/OpenSCAP) -- [Prisma Cloud](https://www.paloaltonetworks.com/prisma/cloud) :heavy_dollar_sign: - (previously Twistlock Security Suite) detects vulnerabilities, hardens container images, and enforces security policies across the lifecycle of applications. -- [Sysdig Falco](https://github.com/falcosecurity/falco) - Sysdig Falco is an open source container security monitor. It can monitor application, container, host, and network activity and alert on unauthorized activity. -- [Sysdig Secure](https://sysdig.com/products/secure/runtime-security/) :heavy_dollar_sign: - Sysdig Secure addresses run-time security through behavioral monitoring and defense, and provides deep forensics based on open source Sysdig for incident response. -- [Trend Micro DeepSecurity](https://www.trendmicro.com/en_us/business/products/hybrid-cloud/deep-security.html) :heavy_dollar_sign: - Trend Micro DeepSecurity offers runtime protection for container workloads and hosts as well as preruntime scanning of images to identify vulnerabilities, malware and content such as hardcoded secrets. +- [Amazon Elastic Container Registry](https://aws.amazon.com/ecr/) - :yen: Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. +- [Azure Container Registry](https://azure.microsoft.com/en-us/products/container-registry/#overview) - :yen: Manage a Docker private registry as a first-class Azure resource. +- [Cloudsmith](https://cloudsmith.com/product/formats/docker-registry) - :yen: A fully managed package management SaaS, with first-class support for public and private Docker registries (and many others, incl. Helm charts for the Kubernetes ecosystem). Has a generous free-tier and is also completely free for open-source. +- [Container Registry Service](https://container-registry.com/) - :yen: Harbor based Container Management Solution as a Service for teams and organizations. Free tier offers 1 GB storage for private repositories. +- [Cycle.io](https://cycle.io/) - :yen: Bare-metal container hosting. +- [DigitalOcean](https://www.digitalocean.com/products/container-registry) - :yen: DigitalOcean Container Registry. +- [Docker Hub](https://hub.docker.com/) provided by Docker Inc. +- [Docker Registry v2][distribution] - The Docker toolset to pack, ship, store, and deliver content +- [Dragonfly](https://github.com/dragonflyoss/Dragonfly2) - Provide efficient, stable and secure file distribution and image acceleration based on p2p technology. +- [GCP Artifact Registry](https://docs.cloud.google.com/artifact-registry/docs) - :yen: Fast, private Docker image storage on Google Cloud Platform. +- [Gitea Container Registry](https://docs.gitea.com/usage/packages/container) - Integrated Docker registry in Gitea, ideal for private, small-scale image hosting. +- [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - GitHub's solution for storing and managing Docker images, with tight integration into GitHub Actions. +- [GitLab Container Registry](https://docs.gitlab.com/user/packages/container_registry/) - Registry focused on using its images in GitLab CI. +- [Harbor](https://github.com/goharbor/harbor) An open source trusted cloud native registry project that stores, signs, and scans content. Supports replication, user management, access control and activity auditing. +- [JFrog Artifactory](https://jfrog.com/artifactory/) - :yen: Artifact Repository Manager, can be used as private Docker Registry as well. +- [kontain.me](https://github.com/imjasonh/kontain.me) - On-demand container image registry that builds and serves images when they are pulled. +- [Kraken](https://github.com/uber/kraken) - Uber's Highly scalable P2P docker registry, capable of distributing TBs of data in seconds. +- [NORA](https://github.com/getnora-io/nora) - Lightweight multi-protocol artifact registry supporting Docker, Maven, npm, Cargo and PyPI in a single 32MB binary. Pull-through cache, Web UI, Prometheus metrics, RBAC auth. +- [nscr](https://github.com/jhstatewide/nscr) - A light-weight, self-contained container registry that's easy to run and maintain. +- [Quay.io](https://quay.io/) - :yen: Secure hosting for private Docker repositories. +- [Registryo](https://github.com/inmagik/registryo) - UI and token based authentication server for onpremise docker registry. +- [RepoFlow](https://www.repoflow.io) - A simple and easy-to-use package management platform with Docker support alongside other formats like PyPI, Maven, npm, and Helm. Includes smart search, built-in Docker image scanning, and a great free option for both self-hosted and cloud use. +- [Sonatype Nexus Repository](https://www.sonatype.com/products/sonatype-nexus-repository) - Manage binaries and build artifacts across your software supply chain. + +### Registry CLI + +Daemonless command-line tools for inspecting, copying, and manipulating images in OCI/Docker registries. + +- [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) - Lightweight CLI to manipulate registry images, from `go-containerregistry`. +- [go-containerregistry](https://github.com/google/go-containerregistry) - Go library and CLI tools (`crane`, `gcrane`, `registry`) for working with container registries. +- [oras](https://github.com/oras-project/oras) - Push and pull arbitrary OCI artifacts to and from any OCI registry. +- [regctl](https://github.com/regclient/regclient) - Daemonless registry client; copy, inspect, modify, and sign OCI images. +- [skopeo](https://github.com/containers/skopeo) - Work with remote image registries: retrieve information, copy images, sign content. + +### Image Scanning & SBOM + +Image vulnerability scanners, SBOM generators, and digest pinning tools. Commercial entries marked `:yen:`. + +- [Anchor](https://github.com/SongStitch/anchor/) - A tool to ensure reproducible builds by pinning dependencies inside your Dockerfiles. +- [Anchor Enterprise](https://anchore.com/) - :yen: Analyze images for CVE vulnerabilities and against custom security policies. +- [BomLens](https://github.com/sktelecom/bomlens) - Scan container images (plus source, binaries, and firmware) into CycloneDX SBOMs with vulnerability, license, and notice reports. Ships as a single Docker image with a web UI. +- [Clair](https://github.com/quay/clair) - Clair is an open source project for the static analysis of vulnerabilities in appc and docker containers. +- [Docker Scout](https://github.com/docker/scout-cli) - Official Docker CLI for SBOM generation, vulnerability analysis, and policy evaluation. +- [Grype](https://github.com/anchore/grype) - A vulnerability scanner for container images, filesystems and SBOMs. +- [oscap-docker](https://github.com/OpenSCAP/openscap) - OpenSCAP provides oscap-docker tool which is used to scan Docker containers and images. +- [pindock](https://github.com/deadnews/pindock) - Pin and update Docker image digests in Dockerfiles and compose files. +- [Syft](https://github.com/anchore/syft) - CLI tool and library for generating a Software Bill of Materials (SBOM) from container images and filesystems. - [Trivy](https://github.com/aquasecurity/trivy) - Aqua Security's open source simple and comprehensive vulnerability scanner for containers (suitable for CI). -### Service Discovery +### Supply Chain -- [docker-consul](https://github.com/gliderlabs/docker-consul) by [@progrium][progrium] -- [etcd](https://github.com/etcd-io/etcd) - Distributed reliable key-value store for the most critical data of a distributed system by [@etcd-io](https://github.com/etcd-io) (former part of CoreOS) -- [istio](https://github.com/istio/istio) - An open platform to connect, manage, and secure microservices by [@IstioMesh](istio) -- [proxy](https://github.com/factorish/proxy) :skull: - lightweight nginx based load balancer self using service discovery provided by registrator. by [@factorish](https://github.com/factorish) -- [registrator](https://github.com/gliderlabs/registrator) - Service registry bridge for Docker by [@gliderlabs][gliderlabs] and [@progrium][progrium] +Signing, attestation, and provenance for container images. -### Volume Management / Data +- [cosign](https://github.com/sigstore/cosign) - Container signing, verification, and transparency log for OCI artifacts. +- [in-toto](https://github.com/in-toto/in-toto) - Framework for supply chain attestations; underpins SLSA and cosign provenance. +- [policy-controller](https://github.com/sigstore/policy-controller) - Kubernetes admission controller enforcing cosign signatures on container images. +- [witness](https://github.com/in-toto/witness) - Generate and verify in-toto attestations across the build pipeline. -- [Blockbridge](https://github.com/blockbridge/blockbridge-docker-volume) :heavy_dollar_sign:- The Blockbridge plugin is a volume plugin that provides access to an extensible set of container-based persistent storage options. It supports single and multi-host Docker environments with features that include tenant isolation, automated provisioning, encryption, secure deletion, snapshots and QoS. By [@blockbridge](https://github.com/blockbridge) -- [Convoy](https://github.com/rancher/convoy) - an open-source Docker volume driver that can snapshot, backup and restore Docker volumes anywhere. By [@rancher][rancher] -- [Docker Machine NFS](https://github.com/adlogix/docker-machine-nfs) Activates NFS for an existing boot2docker box created through Docker Machine on OS X. -- [Docker Unison](https://github.com/leighmcculloch/docker-unison) A docker volume container using Unison for fast two-way folder sync. Created as an alternative to slow boot2docker volumes on OS X. By [@leighmcculloch](https://github.com/leighmcculloch) -- [Local Persist](https://github.com/MatchbookLab/local-persist) Specify a mountpoint for your local volumes (created via `docker volume create`) so that files will always persist and so you can mount to different directories in different containers. -- [Minio](https://github.com/minio/minio) - S3 compatible object storage server in Docker containers -- [Netshare](https://github.com/ContainX/docker-volume-netshare) Docker NFS, AWS EFS, Ceph & Samba/CIFS Volume Plugin. By [@ContainX][containx] -- [portworx](https://portworx.com) :heavy_dollar_sign: - Decentralized storage solution for persistent, shared and replicated volumes. -- [quobyte](https://www.quobyte.com/) :heavy_dollar_sign: - fully fault-tolerant distributed file system with a docker volume driver -- [REX-Ray](https://github.com/rexray/rexray) provides a vendor agnostic storage orchestration engine. The primary design goal is to provide persistent storage for Docker, Kubernetes, and Mesos. By[@thecodeteam](https://github.com/thecodeteam) (DELL Technologies) -- [Storidge](https://github.com/Storidge/quick-start) :heavy_dollar_sign: - Software-defined Persistent Storage for Kubernetes and Docker Swarm +## Running Containers -### User Interface +### Composition -#### IDE integrations +- [Composerize](https://github.com/magicmark/composerize) - Convert docker run commands into docker-compose files. +- [ctk](https://github.com/ctk-hq/ctk) - Visual composer for container based workloads. +- [kompose](https://github.com/kubernetes/kompose) - Go from Docker Compose to Kubernetes. +- [plash](https://github.com/ihucos/plash) - A container run and build engine - runs inside docker. +- [podman-compose](https://github.com/containers/podman-compose) - A script to run docker-compose.yml using podman. +- [Smalte](https://github.com/roquie/smalte) – Dynamically configure applications that require static configuration in docker container. -- JetBrains IDEs (IntelliJ IDEA, GoLand, WebStorm, CLion etc.) has [built-in Docker plugin](https://www.jetbrains.com/help/idea/docker.html#managing-images) -- Eclipse [Docker Tooling plugin](https://www.eclipse.org/community/eclipse_newsletter/2016/july/article2.php) -- [docker.vim](https://github.com/skanehira/docker.vim) - Manage docker containers and images in Vim. By [@skanehira] -- [docker.el](https://github.com/Silex/docker.el) Manage docker from Emacs by [@Silex](https://github.com/Silex) - -#### Desktop - -Native desktop applications for managing and montoring docker hosts and clusters - -- [Docker Desktop](https://www.docker.com/products/docker-desktop) - Official native app. Only for Windows and MacOS -- [Dockeron](https://github.com/dockeron/dockeron) - A project built on Electron + Vue.js for Docker on desktop. [@fluency03](https://github.com/fluency03) -- [DockerStacks](http://docker-stacks.com/) - Local LAMP/LEMP Development Studio [@sfx101](https://github.com/sfx101) -- [DockStation](https://github.com/DockStation/dockstation) - A developer centric UI to configure, monitor, and manage services and containers [@dock_station](https://twitter.com/dock_station) -- [Lifeboat](https://github.com/jplhomer/lifeboat) - An easy way to launch Docker projects with a graphical interface on your Mac. [@jplhomer](https://github.com/jplhomer) -- [Simple Docker UI](https://github.com/felixgborrego/simple-docker-ui) - built on Electron. By [@felixgborrego](https://github.com/felixgborrego/) - -#### Terminal - -##### Terminal UI - -- [ctop (1)](https://github.com/yadutaf/ctop) - A command line / text based Linux Containers monitoring tool that works just like you expect (Python) by [@yadutaf](https://github.com/yadutaf) -- [ctop (2)](https://github.com/bcicen/ctop) - Top-like interface for container metrics (Golang) by [@bcicen](https://github.com/bcicen/) -- [dive](https://github.com/wagoodman/dive) - A tool for exploring each layer in a docker image. By [wagoodman](https://github.com/wagoodman). -- [dockdash](https://github.com/byrnedo/dockdash) detailed stats. By [@byrnedo] -- [Docker-mon](https://github.com/icecrime/docker-mon) :skull: - Console-based Docker monitoring by [@icecrime](https://github.com/icecrime) -- [dockly](https://github.com/lirantal/dockly) - An interactive shell UI for managing Docker containers by [@lirantal](https://github.com/lirantal) -- [DockSTARTer](https://github.com/GhostWriters/DockSTARTer) - DockSTARTer helps you get started with home server apps running in Docker by [GhostWriters](https://github.com/GhostWriters) -- [docui](https://github.com/skanehira/docui) - An interactive shell UI for managing Docker containers. Also works in Windows. By [@skanehira] -- [dry](https://github.com/moncho/dry) - An interactive CLI for Docker containers by [@moncho](https://github.com/moncho) -- [lazydocker](https://github.com/jesseduffield/lazydocker) - The lazier way to manage everything docker. A simple terminal UI for both docker and docker-compose, written in Go with the gocui library. By [@jesseduffield](https://github.com/jesseduffield) -- [sen](https://github.com/TomasTomecek/sen) - :skull: Terminal user interface for docker engine, by [@TomasTomecek][tomastomecek] - -##### CLI tools - -- [captain](https://github.com/jenssegers/captain) - Easily start and stop docker compose projects from any directory. By [@jenssegers](https://github.com/jenssegers) -- [dcinja](https://github.com/Falldog/dcinja) - The powerful and smallest binary size of template engine for docker command line environment. By [@Falldog](https://github.com/Falldog) -- [docker-ls](https://github.com/mayflower/docker-ls) - CLI tools for browsing and manipulating docker registries by [@mayflower](https://github.com/mayflower) -- [docker pushrm](https://github.com/christian-korneck/docker-pushrm) - A Docker CLI plugin that lets you push the README.md file from the current directory to Docker Hub. Also supports Quay and Harbor. By [@christian-korneck](https://github.com/christian-korneck) -- [dockersql](https://github.com/crosbymichael/dockersql) - A command line interface to query Docker using SQL by [@crosbymichael](https://github.com/crosbymichael) -- [DVM](https://github.com/howtowhale/dvm) - Docker version manager by [@howtowhale](https://github.com/howtowhale) -- [goinside](https://github.com/iamsoorena/goinside) - Get inside a running docker container easily. by [@iamsoorena](https://github.com/iamsoorena) -- [ns-enter](https://github.com/jpetazzo/nsenter) - :skull: no more ssh, enter name spaces of container by [@jpetazzo][jpetazzo] -- [Pdocker](https://github.com/g31s/Pdocker) - A simple tool to manage and maintain Docker for personal projects by [@g31s](g31s) -- [proco](https://github.com/shiwaforce/poco) - Proco will help you to organise and manage Docker, Docker-Compose, Kubernetes projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment. by [@shiwaforce](https://github.com/shiwaforce) -- [reg](https://github.com/genuinetools/reg) - Docker registry v2 command line client by [@genuinetools][genuinetools] -- [scuba](https://github.com/JonathonReinhart/scuba) - Transparently use Docker containers to encapsulate software build environments, by [@JonathonReinhart](https://github.com/JonathonReinhart) -- [skopeo](https://github.com/containers/skopeo) - Work with remote images registries - retrieving information, images, signing content by [@containers][containers] -- [supdock](https://github.com/segersniels/supdock) - Allows for slightly more visual usage of Docker with an interactive prompt. By [@segersniels](https://github.com/segersniels) -- [tsaotun](https://github.com/qazbnm456/tsaotun) - Python based Assistance for Docker by [@qazbnm456](https://github.com/qazbnm456) -- [wharfee](https://github.com/j-bennet/wharfee) - Autocompletion and syntax highlighting for Docker commands. by [@j-bennet](https://github.com/j-bennet) - -##### Other - -- [dext-docker-registry-plugin](https://github.com/vutran/dext-docker-registry-plugin) - Search the Docker Registry with the Dext smart launcher. By [@vutran](https://github.com/vutran) -- [docker-ssh](https://github.com/jeroenpeeters/docker-ssh) - SSH Server for Docker containers ~ Because every container should be accessible. By [@jeroenpeeters](https://github.com/jeroenpeeters) -- [dockercraft](https://github.com/docker/dockercraft) - Docker + Minecraft = Dockercraft by [@docker][docker] -- [dockerfile-mode](https://github.com/spotify/dockerfile-mode) An emacs mode for handling Dockerfiles by [@spotify][spotify] -- [MultiDocker](https://github.com/marty90/multidocker) - Create a secure multi-user Docker machine, where each user is segregated into an indepentent container. -- [Powerline-Docker](https://github.com/adrianmo/powerline-docker) - A Powerline segment for showing the status of Docker containers by [@adrianmo](https://github.com/adrianmo) - -#### Web - -- [Admiral](https://github.com/vmware/admiral) Admiral™ is a highly scalable and very lightweight Container Management platform for deploying and managing container based applications. By [VMWare] -- [Container Web TTY](https://github.com/wrfly/container-web-tty) - Connect your containers via a web-tty [@wrfly](https://github.com/wrfly) -- [Docker Compose UI](https://github.com/francescou/docker-compose-ui) - Manage docker-compose via HTTP. docker-compose-ui runs in a Docker container, mounts the hosts docker socket and exposes a RESTful API and AngularJS GUI -- [Docker Registry Browser](https://github.com/klausmeyer/docker-registry-browser) - Web Interface for the Docker Registry HTTP API v2 by [@klausmeyer](https://github.com/klausmeyer) -- [Docker Registry UI (Joxit)](https://github.com/Joxit/docker-registry-ui) - The simplest and cleanest UI for private registries by [@Joxit](https://github.com/Joxit) -- [Docker Registry UI](https://github.com/atcol/docker-registry-ui) - A web UI for easy private/local Docker Registry integration by [@atcol](https://github.com/atcol) -- [docker-registry-web](https://github.com/mkuchin/docker-registry-web) - Web UI, authentication service and event recorder for private docker registry v2 by [@mkuchin](https://github.com/mkuchin) -- [docker-swarm-visualizer](https://github.com/dockersamples/docker-swarm-visualizer) - Visualizes Docker services on a Docker Swarm (for running demos). -- [dockering-on-rails](https://github.com/Electrofenster/dockerding-on-rails) :skull: - Simple Web-Interface for Docker with a lot of features by [@Electrofenster](https://github.com/Electrofenster/) -- [DockerSurfer](https://github.com/Simone-Erba/DockerSurfer) :skull: - A web service for analyze and browse dependencies between Docker images in the Docker registry, by [@Simone-Erba](https://github.com/Simone-Erba/) -- [Kubevious](https://github.com/kubevious/kubevious) - A highly visual web UI for Kubernetes which renders configuration and state in an application centric way by [@rubenhak](https://github.com/rubenhak). -- [netdata](https://github.com/netdata/netdata) - Real-time performance monitoring -- [OctoLinker](https://github.com/OctoLinker/OctoLinker) - A browser extension for GitHub that makes the image name in a `Dockerfile` clickable and redirect you to the related Docker Hub page. -- [Portainer](https://github.com/portainer/portainer) - A lightweight management UI for managing your Docker hosts or Docker Swarm clusters by [@portainer](https://github.com/portainer) -- [Rapid Dashboard](https://github.com/ozlerhakan/rapid) - A simple query dashboard to use Docker Remote API by [@ozlerhakan](https://github.com/ozlerhakan/) -- [Seagull](https://github.com/tobegit3hub/seagull) - Friendly Web UI to monitor docker daemon. by [@tobegit3hub](https://github.com/tobegit3hub) -- [Swarmpit](https://github.com/swarmpit/swarmpit) - Swarmpit provides simple and easy to use interface for your Docker Swarm cluster. You can manage your stacks, services, secrets, volumes, networks etc. -- [Swirl](https://github.com/cuigh/swirl) - Swirl is a web management tool for Docker, focused on swarm cluster By [@cuigh](https://github.com/cuigh/) -- [Theia](https://github.com/eclipse-theia/theia) - Extensible platform to develop full-fledged multi-language Cloud & Desktop IDE-like products with state-of-the-art web technologies. -- [Yacht](https://github.com/SelfhostedPro/Yacht) :construction: - A Web UI for docker that focuses on templates and ease of use in order to make deployments as easy as possible. By [@SelfhostedPro](https://github.com/SelfhostedPro) +### Orchestration -## Docker Images +- [CloudSlang](https://github.com/CloudSlang/cloud-slang) - CloudSlang is a workflow engine to create Docker process automation. +- [docker rollout](https://github.com/Wowu/docker-rollout) - Zero downtime deployment for Docker Compose services. +- [Kubernetes](https://github.com/kubernetes/kubernetes) - Open source orchestration system for Docker containers by Google. +- [Mesos](https://github.com/apache/mesos) - Resource/Job scheduler for containers, VM's and physical hosts. +- [Nebula](https://github.com/nebula-orchestrator) - A Docker orchestration tool designed to manage massive scale distributed clusters. +- [Nomad](https://github.com/hashicorp/nomad) - Easily deploy applications at any scale. A Distributed, Highly Available, Datacenter-Aware Scheduler. +- [Rancher](https://github.com/rancher/rancher) - An open source project that provides a complete platform for operating Docker in production. +- [Swarm-cronjob](https://github.com/crazy-max/swarm-cronjob) - Create jobs on a time-based schedule on Swarm. -### Base Tools +### Deployment & Platforms -Tools and applications that are either installed inside containers or designed to be run as a [sidecar](https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar) +Self-hosted and managed cloud platforms (PaaS/CaaS, deployment automation). Commercial entries marked `:yen:`. -- [amicontained](https://github.com/genuinetools/amicontained) - Container introspection tool. Find out what container runtime is being used as well as features available by [@genuinetools][genuinetools] -- [autodock](https://github.com/prologic/autodock) - Daemon for Docker Automation by [@prologic](https://github.com/prologic) -- [Chaperone](https://github.com/garywiz/chaperone) - A single PID1 process designed for docker containers. Does user management, log management, startup, zombie reaping, all in one small package. by [@garywiz](https://github.com/garywiz) -- [ckron](https://github.com/nicomt/ckron) - A cron-style job scheduler for docker, by [@nicomt](https://github.com/nicomt) -- [CoreOS][coreos] - Linux for Massive Server Deployments -- [distroless](https://github.com/GoogleContainerTools/distroless) - Language focused docker images, minus the operating system, by [@GoogleContainerTools][googlecontainertools] -- [docker-alpine](https://github.com/gliderlabs/docker-alpine) - A super small Docker base image _(5MB)_ using Alpine Linux by [@gliderlabs][gliderlabs] -- [docker-gen](https://github.com/jwilder/docker-gen) - Generate files from docker container meta-data by [@jwilder][jwilder] -- [dockerize](https://github.com/jwilder/dockerize) - Utility to simplify running applications in docker containers by [@jwilder][jwilder] -- [GoSu](https://github.com/tianon/gosu) - Run this specific application as this specific user and get out of the pipeline (entrypoint script tool) by [@tianon](https://github.com/tianon) -- [is-docker](https://github.com/sindresorhus/is-docker) - Check if the process is running inside a Docker container by [@sindresorhus][sindresorhus] -- [lstags](https://github.com/ivanilves/lstags) - sync Docker images across registries by [@ivanilves](https://github.com/ivanilves) -- [NVIDIA-Docker](https://github.com/NVIDIA/nvidia-docker) - The NVIDIA Container Runtime for Docker by [@NVIDIA][nvidia] -- [su-exec](https://github.com/ncopa/su-exec) - This is a simple tool that will simply execute a program with different privileges. The program will be executed directly and not run as a child, like su and sudo does, which avoids TTY and signal issues. Why reinvent gosu? This does more or less exactly the same thing as gosu but it is only 10kb instead of 1.8MB. By [ncopa](https://github.com/ncopa) -- [sue](https://github.com/theAkito/sue) - Executes a program as a user different from the user running sue. This is a maintainable alternative to ncopa/su-exec, which is the better tianon/gosu. This one is far better (higher performance, smaller size), than the original gosu, however it is far easier to maintain, than su-exec, which is written in plain C. Made by [@theAkito](https://github.com/theAkito) -- [supercronic](https://github.com/aptible/supercronic) - crontab-compatible job runner, designed specifically to run in containers by [@aptible](https://github.com/aptible/) -- [TrivialRC](https://github.com/vorakl/TrivialRC) - A minimalistic Runtime Configuration system and process manager for containers [@vorakl](https://github.com/vorakl) +- [Amazon ECS](https://aws.amazon.com/ecs/) - :yen: A management service on EC2 that supports Docker containers. +- [Appfleet](https://appfleet.com/) - :yen: Edge platform to deploy and manage containerized services globally; routes traffic to the closest location for low latency. +- [Azure AKS](https://azure.microsoft.com/en-us/products/kubernetes-service/) - :yen: Fully managed Kubernetes container orchestration service. +- [blackfish](https://gitlab.com/blackfish/blackfish) - A CoreOS VM to build swarm clusters for Dev & Production. +- [BosnD](https://gitlab.com/n0r1sk/bosnd) - BosnD, the boatswain daemon - A dynamic configuration file writer & service reloader for dynamically changing container environments. +- [caprover](https://github.com/caprover/caprover) - [Previously known as CaptainDuckDuck] Automated Scalable Webserver Package (automated Docker+nginx) - Heroku on Steroids. +- [Cloud 66](https://www.cloud66.com) - :yen: Full-stack hosted container management as a service. +- [Cloud Run Compose](https://docs.cloud.google.com/run/docs/deploy-run-compose) - :yen: Deploy `docker-compose.yaml` files directly to Google Cloud Run as a managed service. +- [Convox Rack](https://github.com/convox/rack) - Convox Rack is open source PaaS built on top of expert infrastructure automation and devops best practices. +- [docker-to-iac](https://github.com/deploystackio/docker-to-iac) - Translate docker run and commit into Infrastructure as Code templates for AWS, Render.com and DigitalOcean. +- [doco-cd](https://github.com/kimdre/doco-cd) - Lightweight GitOps and Continuous Deployment tool to deploy Docker Compose projects and Swarm stacks using polling and webhooks. +- [Dokku](https://github.com/dokku/dokku) - Docker powered mini-Heroku that helps you build and manage the lifecycle of applications. +- [Exoframe](https://github.com/exoframejs/exoframe) - A self-hosted tool that allows simple one-command deployments using Docker. +- [Giant Swarm](https://www.giantswarm.io/) - :yen: Simple microservice infrastructure. Deploy your containers in seconds. +- [Google Container Engine](https://docs.cloud.google.com/kubernetes-engine/docs) - :yen: Docker containers on Google Cloud Computing powered by [Kubernetes][kubernetes]. +- [Grafeas](https://github.com/grafeas/grafeas) - A common API for metadata about containers, from image and build details to security vulnerabilities. +- [Mesosphere DC/OS Platform](https://d2iq.com/products/dcos) - :yen: Integrated platform for data and containers built on Apache Mesos. +- [OpenRun](https://github.com/openrundev/openrun) - Builds, deploys, proxies, authenticates and auto-pauses web apps with Docker or Kubernetes. +- [OpenShift][openshift] - An open source PaaS built on [Kubernetes][kubernetes] and optimized for Dockerized app development and deployment by [Red Hat](https://www.redhat.com/en) +- [Red Hat OpenShift Dedicated](https://www.redhat.com/en/technologies/cloud-computing/openshift/dedicated) - :yen: Fully-managed Red Hat® OpenShift® service on Amazon Web Services and Google Cloud. +- [swarm-ansible](https://github.com/LombardiDaniel/swarm-ansible?tab=readme-ov-file) - Swarm-Ansible bootstraps a production-ready swarm cluster using ansible. Comes with tools to automate CI, help monitoring and traefik pre-configured for SSL certificates and simple-auth. Comes with a private registry and more!. +- [SwarmManagement](https://github.com/hansehe/SwarmManagement) - Swarm Management is a python application, installed with pip. The application makes it easy to manage a Docker Swarm by configuring a single yaml file describing which stacks to deploy, and which networks, configs or secrets to create. +- [Triton](https://www.joyent.com/) - :yen: Elastic container-native infrastructure. +- [Tsuru](https://github.com/tsuru/tsuru) - Tsuru is an extensible and open source Platform as a Service software. +- [werf](https://github.com/werf/werf) - Werf is a CI/CD tool for building Docker images efficiently and deploying them to Kubernetes using GitOps. -### Builder +### Garbage Collection -Applications designed to help or simplify building **new** images +- [docker-custodian](https://github.com/Yelp/docker-custodian) - Keep docker hosts tidy. +- [Docuum](https://github.com/stepchowfun/docuum) - Least recently used (LRU) eviction of Docker images. -- [ansible-bender](https://github.com/ansible-community/ansible-bender) - A tool utilising `ansible` and `buildah` by [@TomasTomecek][tomastomecek] -- [buildah](https://github.com/containers/buildah) - A tool that facilitates building OCI images by [@containers][containers] -- [BuildKit](https://github.com/moby/buildkit) - Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit by [@moby project](https://github.com/moby) -- [cekit](https://github.com/cekit/cekit) - A tool used by openshift to build base images using different build engines by [@cekit](https://github.com/cekit). -- [container-diff](https://github.com/GoogleContainerTools/container-diff) - An image tool for comparing and analyzing container images by [@GoogleContainerTools][googlecontainertools] -- [container-factory](https://github.com/mutable/container-factory) - Produces Docker images from tarballs of application source code by [@mutable](https://github.com/mutable) -- [copy-docker-image](https://github.com/mdlavin/copy-docker-image) - Copy a Docker image between registries without a full Docker installation by [@mdlavin](https://github.com/mdlavin) -- [Derrick](https://github.com/alibaba/derrick) - A tool help you to automate the generation of Dockerfile and dockerize application by scanning the code. By [@alibaba](https://github.com/alibaba). -- [dlayer](https://github.com/orisano/dlayer) - docker layer analyzer by [@orisano](https://github.com/orisano) -- [docker-companion](https://github.com/mudler/docker-companion) - A command line tool written in Golang to squash and unpack docker images by [@mudler](https://github.com/mudler/) -- [docker-make](https://github.com/CtripCloud/docker-make) - Build, tag,and push a bunch of related docker images via a single command. -- [docker-replay](https://github.com/bcicen/docker-replay) - Generate `docker run`command and options from running containers. By [bcicen](https://github.com/bcicen) -- [DockerMake](https://github.com/avirshup/DockerMake) - A reproducible Docker image build system for complex software stacks. By [@avirshup](https://github.com/avirshup) -- [DockerSlim](https://github.com/docker-slim/docker-slim) shrinks fat Docker images creating the smallest possible images. -- [Dockly](https://github.com/swipely/dockly) - Dockly is a gem made to ease the pain of packaging an application in Docker by [@swipely](https://github.com/swipely/) -- [dockramp](https://github.com/jlhawn/dockramp) :skull: - Proof of Concept: A Client Driven Docker Image Builder by [@jlhawn](https://github.com/jlhawn) -- [essex](https://github.com/utensils/essex) - Boilerplate for Docker Based Projects: Essex is a CLI utility written in bash to quickly setup clean and consistent Docker projects with Makefile driven workflows. [@jamesbrink](https://github.com/jamesbrink) -- [HPC Container Maker](https://github.com/NVIDIA/hpc-container-maker) - Generates Dockerfiles from a high level Python recipe, including building blocks for High-Performance Computing components by [@NVIDIA][nvidia] -- [img](https://github.com/genuinetools/img) - Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder by [@genuinetools][genuinetools] -- [kaniko](https://github.com/GoogleContainerTools/kaniko) - Build Container Images In Kubernetes. By [@GoogleContainerTools][googlecontainertools] -- [makisu](https://github.com/uber/makisu) - Uber's fast and flexible unprivileged image builder for Mesos and Kubernetes, with distributed cache support. By [@uber](https://github.com/uber) -- [packer](https://www.packer.io/docs/builders/docker) - Hashicorp tool to build machine images including docker image integrated with configuration management tools like chef, puppet, ansible -- [portainer](https://github.com/duedil-ltd/portainer) - Apache Mesos framework for building Docker images by [@duedil-ltd](https://github.com/duedil-ltd) -- [Production-Ready Python Containers :heavy_dollar_sign:](https://pythonspeed.com/products/pythoncontainer/) - A template for creating production-ready Docker images for Python applications. -- [runlike](https://github.com/lavie/runlike) - Generate `docker run`command and options from running containers by [@lavie](https://github.com/lavie) -- [SkinnyWhale](https://github.com/djosephsen/skinnywhale) :skull: - Skinnywhale helps you make smaller (as in megabytes) Docker containers. -- [Smith](https://github.com/oracle/smith) - A Micocontainer Builder and can perform multi-stage builds after the image is built [Oracle][oracle] -- [Whaler](https://github.com/P3GLEG/Whaler) - Program to reverse Docker images into Dockerfiles by [@P3GLEG](https://github.com/P3GLEG/). -- [Whales](https://github.com/Gueils/whales) - A tool to automatically dockerize your applications by [@icalialabs](https://github.com/IcaliaLabs). +## Networking & Proxies -### Dockerfile +### Networking -- [chaperone-docker](https://github.com/garywiz/chaperone-docker) - A set of images using the Chaperone process manager, including a lean Alpine image, LAMP, LEMP, and bare-bones base kits. -- [Dockerfile Generator](https://github.com/ozankasikci/dockerfile-generator) `dfg` is both a Go library and an executable that produces valid Dockerfiles using various input channels. -- [Dockerfile Generator](https://jrruethe.github.io/blog/2015/09/20/dockerfile-generator/) -- [Dockerfile Project](https://dockerfile.github.io/) - Trusted Automated Docker Builds. Dockerfile Project maintains a central repository of Dockerfile for various popular open source software services runnable on a Docker container. -- [dockerfilegraph](https://github.com/patrickhoefler/dockerfilegraph) - Visualize your multi-stage Dockerfiles. By [@PatrickHoefler](https://github.com/patrickhoefler) -- [Dockershelf](https://github.com/Dockershelf/dockershelf) - A repository that serves as a collector for docker recipes that are universal, efficient and slim. Images are updated, tested and published daily via a Travis cron job. Maintained by [@CollageLabs](https://github.com/CollageLabs). -- [dockmoor](https://github.com/MeneDev/dockmoor) :construction: - Manage docker image references and help to create reproducible builds with Docker. By [@MeneDev](https://github.com/MeneDev) -- [Vektorcloud](https://github.com/vektorcloud) - A collection of minimal, Alpine-based Docker images - -Examples by: - -- [@arun-gupta](https://github.com/arun-gupta/docker-images) -- [@awesome-startup](https://github.com/awesome-startup/docker-compose) -- [@crosbymichael](https://github.com/crosbymichael/Dockerfiles) -- [@jessfraz](https://github.com/jessfraz/dockerfiles) -- [@komljen](https://github.com/komljen/dockerfile-examples) -- [@kstaken](https://github.com/kstaken/dockerfile-examples) -- [@ondrejmo](https://github.com/ondrejmo/Dockerfiles) -- [@pandrew](https://gitlab.com/pandrew/dockerfiles) -- [@vimagick](https://github.com/vimagick/dockerfiles) +Container networking, overlay networks, DNS/service-discovery bridges. -### Linter +- [Calico][calico] - Calico is a pure layer 3 virtual network that allows containers over multiple docker-hosts to talk to each other. +- [docker-dns](https://github.com/bytesharky/docker-dns) - Lightweight DNS forwarder for Docker containers, resolves container names with custom suffixes (e.g. `.docker`) on the host to simplify service discovery. +- [Flannel](https://github.com/coreos/flannel/) - Flannel is a virtual network that gives a subnet to each host for use with container runtimes. +- [netshoot](https://github.com/nicolaka/netshoot) - The netshoot container has a powerful set of networking tools to help troubleshoot Docker networking issues. +- [Pipework](https://github.com/jpetazzo/pipework) - Software-Defined Networking for Linux Containers, Pipework works with "plain" LXC containers, and with the awesome Docker. +- [registrator](https://github.com/gliderlabs/registrator) - Service registry bridge for Docker. -- [docker-image-size-limit](https://github.com/wemake-services/docker-image-size-limit) - A tool to keep an eye on your docker images size. -- [Dockerfile Linter action](https://github.com/buddy-works/dockerfile-linter) - The linter lets you verify Dockerfile syntax to make sure it follows the best practices for building efficient Docker images. -- [dockfmt](https://github.com/jessfraz/dockfmt) :construction: - Dockerfile formatter and parser by [@jessfraz][jessfraz] -- [FROM:latest](https://github.com/replicatedhq/dockerfilelint) - An opinionated Dockerfile linter by [@replicatedhq](https://github.com/replicatedhq) -- [Hadolint](https://github.com/hadolint/hadolint) - A Dockerfile linter that checks for best practices, common mistakes, and is also able to lint any bash written in `RUN` instructions; by [@lukasmartinelli](https://github.com/lukasmartinelli) -- [Whale-linter](https://github.com/jeromepin/whale-linter) - A simple and small Dockerfile linter written in Python3+ without dependencies by [@jeromepin](https://github.com/jeromepin) +### Reverse Proxy -### Metadata +Container-aware reverse proxies, ingress, and TLS-terminating front-ends with auto-discovery. -- [opencontainer](https://github.com/opencontainers/image-spec/blob/master/annotations.md) - A convention and shared namespace for Docker labels defined by OCI Image Spec. +- [BunkerWeb](https://github.com/bunkerity/bunkerweb) - Open-source and next-gen Web Application Firewall (WAF). +- [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy) - Caddy-based reverse proxy, configured with service or container labels. +- [caddy-docker-upstreams](https://github.com/invzhi/caddy-docker-upstreams) - Docker upstreams module for Caddy, configured with container labels. +- [Docker Dnsmasq Updater](https://github.com/moonbuggy/docker-dnsmasq-updater) - Update a remote dnsmasq server with Docker container hostnames. +- [docker-flow-proxy](https://github.com/docker-flow/docker-flow-proxy) - Reconfigures proxy every time a new service is deployed, or when a service is scaled. +- [Let's Encrypt Nginx-proxy Companion](https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion) - A lightweight companion container for the nginx-proxy. It allow the creation/renewal of Let's Encrypt certificates automatically. +- [mesh-router](https://github.com/Yundera/mesh-router) - Free domain(nsl.sh) provider for Docker containers with automatic HTTPS routing. Uses Wireguard VPN to securely route subdomain requests across networks. Ideal for self-hosted NAS and cloud deployments. +- [Nginx Proxy Manager](https://github.com/jc21/nginx-proxy-manager) - A beautiful web interface for proxying web based services with SSL. +- [nginx-proxy][nginxproxy] - Automated nginx proxy for Docker containers using docker-gen. +- [OpenResty Manager](https://github.com/Safe3/openresty-manager) - The easiest using, powerful and beautiful OpenResty Manager(Nginx Enhanced Version), open source alternative to OpenResty Edge. +- [Swarm Router](https://github.com/flavioaiello/swarm-router) - A zero config service name based router for docker swarm mode with a fresh and more secure approach. +- [Træfɪk](https://github.com/containous/traefik) - Automated reverse proxy and load-balancer for Docker, Mesos, Consul, Etcd. + +## Storage & Data + +- [Docker Volume Backup](https://github.com/offen/docker-volume-backup) Backup Docker volumes locally or to any S3 compatible storage. +- [Label Backup](https://github.com/resulgg/label-backup) - A lightweight, Docker-aware backup agent that automatically discovers and backs up containerized databases (PostgreSQL, MySQL, MongoDB, Redis) based on Docker labels. Supports local storage and S3-compatible destinations with flexible scheduling via cron expressions. +- [Netshare](https://github.com/ContainX/docker-volume-netshare) Docker NFS, AWS EFS, Ceph & Samba/CIFS Volume Plugin. +- [portworx](https://portworx.com) - :yen: Decentralized storage solution for persistent, shared and replicated volumes. +- [quobyte](https://www.quobyte.com/) - :yen: Fully fault-tolerant distributed file system with a docker volume driver. +- [resq](https://github.com/mashb1t/resq) - Restic-powered Docker backups for volumes, databases, and .env files, with or without stopping containers. Works with local, SSH, or any S3 compatible storage. +- [REX-Ray](https://github.com/rexray/rexray) provides a vendor agnostic storage orchestration engine. The primary design goal is to provide persistent storage for Docker, Kubernetes, and Mesos. + +## Observability + +Monitor Docker hosts, containers, and the services running inside them. Self-hosted and SaaS together; commercial entries marked `:yen:`. + +- [ADRG](https://github.com/jaldertech/adrg) - Dynamic Docker resource governor using cgroups v2 to manage system load. +- [AppDynamics](https://github.com/Appdynamics/docker-monitoring-extension) - :yen: Docker Monitoring extension gathers metrics from the Docker Remote API, either using Unix Socket or TCP. +- [Autoheal](https://github.com/willfarrell/docker-autoheal) - Monitor and restart unhealthy docker containers automatically. +- [Better Stack](https://betterstack.com/community/guides/scaling-docker/) - :yen: A Docker-compatible observability stack that delivers log aggregation and uptime monitoring for containerized apps. +- [cAdvisor](https://github.com/google/cadvisor) - Analyzes resource usage and performance characteristics of running containers. +- [Datadog](https://www.datadoghq.com/) - :yen: Full-stack monitoring service with first-class Docker, Kubernetes, and Mesos support. +- [DLIA](https://github.com/zorak1103/dlia) - DLIA is an AI-powered Docker log monitoring agent that uses Large Language Models (LLMs) to intelligently analyze container logs, detect anomalies, and provide contextual insights over time. +- [docker-exporter](https://github.com/dlepaux/docker-exporter) - Lightweight Prometheus exporter for Docker container metrics written in Rust. Correct cgroup v2 memory working set on ARM64 (Raspberry Pi 5), runs non-root with a read-only socket, ~7 MiB idle RAM. +- [Docker-Sentinel](https://github.com/Will-Luck/Docker-Sentinel) - Automated container updates with per-container policies, rollback safety, and a real-time web dashboard. +- [DockProbe](https://github.com/deep-on/dockprobe) - Lightweight Docker monitoring dashboard in a single container. Real-time metrics, 6 anomaly detection rules, Telegram alerts, and 16 automated security scans. Zero config, ~50MB RAM. +- [DockProc](https://gitlab.com/n0r1sk/dockproc) - I/O monitoring for containers on processlevel. +- [dockprom](https://github.com/stefanprodan/dockprom) - Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager. +- [Doku](https://github.com/amerkurev/doku) - Doku is a simple web-based application that allows you to monitor Docker disk usage. +- [Dozzle](dozzle) - Monitor container logs in real-time with a browser or mobile device. +- [Drydock](https://github.com/CodesWhat/drydock) - Container update monitoring with web dashboard, 23 registry providers, 20 notification triggers, and distributed agent architecture. +- [Dynatrace](https://docs.dynatrace.com/docs/observe/infrastructure-observability/container-platform-monitoring) - :yen: Monitor containerized applications without installing agents or modifying your Run commands. +- [Grafana Docker Dashboard Template](https://grafana.com/grafana/dashboards/179-docker-prometheus-monitoring/) - A template for your Docker, Grafana and Prometheus stack. +- [InfraCanvas](https://github.com/bytestrix/InfraCanvas) - Live visual map of containers, pods, volumes, and networks on any Linux server. Single binary, WebSocket-powered live updates. +- [Maintenant](https://github.com/kolapsis/maintenant) - Self-discovering infrastructure monitoring for Docker and Kubernetes. Auto-detects containers via labels, with endpoint monitoring, heartbeats, TLS certificates, resource metrics, update intelligence, and a built-in status page. Single binary with embedded SPA. +- [Middleware](https://middleware.io/) - :yen: Monitor Docker hosts, containers, logs, and application performance from a unified observability platform. +- [Site24x7](https://www.site24x7.com/docker-monitoring.html) - :yen: Docker Monitoring for DevOps and IT, SaaS Pay-per-Host model. +- [Sysdig Monitor](https://www.sysdig.com/products/monitor) - :yen: Software or SaaS service that monitors, alerts, and troubleshoots containers using system calls; container-specific features for Docker and Kubernetes. +- [Wiremap](https://github.com/codeofmario/wiremap) - A self-hosted visual Docker network topology explorer with real-time log streaming, live stats, embedded terminal, and container inspection. -### Registry +## Security -Services to securely store your Docker images. +Container hardening, runtime security, policy, compliance, and forensics. Self-hosted and commercial together; commercial entries marked `:yen:`. + +- [Aqua Security](https://www.aquasec.com) - :yen: Securing container-based applications from Dev to Production on any platform. +- [buildcage](https://github.com/dash14/buildcage) - Restricts outbound network access during Docker builds to prevent supply chain attacks, working as a drop-in BuildKit remote driver for Docker Buildx, with ready-to-use GitHub Actions. +- [CetusGuard](https://github.com/hectorm/cetusguard) - CetusGuard is a tool that protects the Docker daemon socket by filtering calls to its API endpoints. +- [Checkov](https://github.com/bridgecrewio/checkov) - Static analysis for infrastructure as code manifests (Terraform, Kubernetes, Cloudformation, Helm, Dockerfile, Kustomize) find security misconfiguration and fix them. +- [compose-lint](https://github.com/tmatens/compose-lint) - Lints Docker Compose files for security misconfigurations — privileged containers, unpinned images, Docker socket mounts, plaintext credentials — grounded in OWASP and the CIS Docker Benchmark. +- [container-explorer](https://github.com/google/container-explorer) - Forensic utility to explore Docker and containerd container details from mounted disk images. +- [Deepfence Threat Mapper](https://github.com/deepfence/ThreatMapper) - Powerful runtime vulnerability scanner for kubernetes, virtual machines and serverless. +- [Den](https://github.com/us/den) - Self-hosted sandbox runtime for AI agents with Docker containers, security hardening, REST API and WebSocket support. +- [docker-bench-security](https://github.com/docker/docker-bench-security) - Script that checks for dozens of common best-practices around deploying Docker containers in production. +- [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy) - HAProxy-based fine-grained filter for the Docker API socket; widely used to expose a restricted socket to reverse proxies and homelab stacks. +- [KICS](https://github.com/checkmarx/kics) - An infrastructure-as-code scanning tool, find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle. Can be extended for additional policies. +- [Prisma Cloud](https://www.paloaltonetworks.com/prisma/cloud) - :yen: (Previously Twistlock Security Suite) detects vulnerabilities, hardens container images, and enforces security policies across the lifecycle of applications. +- [segspec](https://github.com/dormstern/segspec) - Extracts network dependencies from Docker Compose, Kubernetes manifests, Helm charts, and other config files to generate Kubernetes NetworkPolicies with evidence tracing. +- [Sysdig Falco](https://github.com/falcosecurity/falco) - Sysdig Falco is an open source container security monitor. It can monitor application, container, host, and network activity and alert on unauthorized activity. +- [Sysdig Secure](https://www.sysdig.com/solutions/cloud-detection-and-response-cdr) - :yen: Sysdig Secure addresses run-time security through behavioral monitoring and defense, and provides deep forensics based on open source Sysdig for incident response. +- [Trend Micro DeepSecurity](https://www.trendmicro.com/en_us/business/products/hybrid-cloud/deep-security.html) - :yen: Trend Micro DeepSecurity offers runtime protection for container workloads and hosts as well as preruntime scanning of images to identify vulnerabilities, malware and content such as hardcoded secrets. + +## User Interfaces + +### Desktop + +Native desktop applications for managing and monitoring docker hosts and clusters + +- [Docker DB Manager](https://github.com/AbianS/docker-db-manager) - Desktop app for managing Docker database containers with visual interface and one-click operations. +- [Docker Desktop](https://www.docker.com/products/docker-desktop/) - Official native app. Only for Windows and MacOS. +- [Simple Docker UI](https://github.com/felixgborrego/simple-docker-ui) - Built on Electron. +- [Stevedore](https://github.com/slonopotamus/stevedore) - Good Docker Desktop replacement for Windows. Both Linux and Windows Containers are supported. [slonopotamus](https://github.com/slonopotamus). + +### Terminal + +TUIs, CLI tools, and shell integrations for Docker. + +- [d4s](https://github.com/jr-k/d4s) - A fast, keyboard-driven terminal UI to manage Docker containers, Compose stacks, and Swarm services with the ergonomics of K9s. +- [dcinja](https://github.com/Falldog/dcinja) - The powerful and smallest binary size of template engine for docker command line environment. +- [dctl](https://github.com/FabienD/docker-stack) - Dctl is a Cli tool that helps developers by allowing them to execute all docker compose commands anywhere in the terminal, and more. +- [decompose](https://github.com/s0rg/decompose) - Reverse-engineering tool for docker environments. +- [dive](https://github.com/wagoodman/dive) - A tool for exploring each layer in a docker image. +- [docker pushrm](https://github.com/christian-korneck/docker-pushrm) - A Docker CLI plugin that lets you push the README.md file from the current directory to Docker Hub. Also supports Quay and Harbor. +- [docker-captain](https://github.com/lucabello/docker-captain) - A friendly CLI to manage multiple Docker Compose deployments with style — powered by Typer, Rich, questionary, and sh. +- [dockerfile-mode](https://github.com/spotify/dockerfile-mode) - An Emacs mode for handling Dockerfiles. +- [dockerfilegraph](https://github.com/patrickhoefler/dockerfilegraph) - Visualize your multi-stage Dockerfiles. +- [dockly](https://github.com/lirantal/dockly) - An interactive shell UI for managing Docker containers. +- [DockMate](https://github.com/shubh-io/dockmate) - Lightweight terminal-based Docker and Podman manager with a text-based user interface,. +- [DockSTARTer](https://github.com/GhostWriters/DockSTARTer) - DockSTARTer helps you get started with home server apps running in Docker. +- [DockTUI](https://github.com/strmax195-hue/docktui) - Fast, zero-dependency terminal dashboard for Docker and Compose. +- [dockup](https://github.com/paulo-amaral/dockup) - TUI to install, harden and maintain container runtimes: Docker Engine + Compose v2, NVIDIA Container Toolkit, Podman and Apple container, with a CIS-inspired security audit. +- [dprs](https://github.com/durableprogramming/dprs) - A developer-focused TUI for managing Docker containers with real-time log streaming and container management. +- [dry](https://github.com/moncho/dry) - An interactive CLI for Docker containers. +- [easydocker](https://github.com/joao-zanutto/easydocker) - A Terminal UI highly inpired by k9s levaraging beatiful BubbleTea graphics. +- [goManageDocker](https://github.com/ajayd-san/gomanagedocker) - TUI tool to view and manage your docker objects blazingly fast with sensible keybindings, also supports VIM navigation out of the box. +- [lazydocker](https://github.com/jesseduffield/lazydocker) - The lazier way to manage everything docker. A simple terminal UI for both docker and docker-compose, written in Go with the gocui library. +- [lazyjournal](https://github.com/Lifailon/lazyjournal) - A interface for reading and filtering the logs output of Docker and Podman containers like [Dozzle](dozzle) but for the terminal with support for fuzzy find, regex and output coloring. +- [oxker](https://github.com/mrjackwills/oxker) - A simple tui to view & control docker containers. +- [proco](https://github.com/shiwaforce/poco) - Proco will help you to organise and manage Docker, Docker-Compose, Kubernetes projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment. +- [scuba](https://github.com/JonathonReinhart/scuba) - Transparently use Docker containers to encapsulate software build environments,. +- [supdock](https://github.com/segersniels/supdock) - Allows for slightly more visual usage of Docker with an interactive prompt. +- [swarmcli](https://github.com/Eldara-Tech/swarmcli) - Swarm Management at the speed of thought — with real-time log streaming, instant shell access to containers, seamless port forwarding, and on-demand secret reveal capabilities, giving you full control over your Docker Swarm without breaking your flow. +- [tdocker](https://github.com/pivovarit/tdocker) - A `docker ps` replacement for everyday container operations. +- [wharf](https://github.com/idesyatov/wharf) - A k9s-inspired TUI for Docker Compose with vim-style navigation, real-time CPU/MEM monitoring with braille charts, container file browser, SSH remote host support, and command mode. + +### Web + +- [Arcane](https://github.com/getarcaneapp/arcane) - An easy and modern Docker management platform, built with everybody in mind. +- [CASA](https://github.com/knrdl/casa) - Outsource the administration of a handful of containers to your co-workers,. +- [Container Web TTY](https://github.com/wrfly/container-web-tty) - Connect your containers via a web-tty. +- [Docker Registry Browser](https://github.com/klausmeyer/docker-registry-browser) - Web Interface for the Docker Registry HTTP API v2. +- [docker-swarm-visualizer](https://github.com/dockersamples/docker-swarm-visualizer) - Visualizes Docker services on a Docker Swarm (for running demos). +- [dockge](https://github.com/louislam/dockge) - Easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager. +- [Komodo](https://github.com/mbecker20/komodo) - A tool to build and deploy software on many servers. +- [Portainer](https://github.com/portainer/portainer) - A lightweight management UI for managing your Docker hosts or Docker Swarm clusters. +- [Swarmpit](https://github.com/swarmpit/swarmpit) - Swarmpit provides simple and easy to use interface for your Docker Swarm cluster. You can manage your stacks, services, secrets, volumes, networks etc. +- [usulnet](https://github.com/fr4nsys/usulnet) - A complete and modern Docker management platform designed for sysadmin, devops with enterprise grade tools, cve scanner, ssh, rdp on web and much more. -- [Amazon EC2 Container Registry :heavy_dollar_sign:](https://aws.amazon.com/ecr/) - Amazon EC2 Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. -- [Azure Container Registry :heavy_dollar_sign:](https://azure.microsoft.com/en-us/services/container-registry/) - Manage a Docker private registry as a first-class Azure resource -- [CargoOS](https://github.com/RedCoolBeans/cargos-buildroot) - A bare essential OS for running the Docker Engine on bare metal or Cloud. By [@RedCoolBeans](https://github.com/RedCoolBeans) -- [cleanreg](https://github.com/hcguersoy/cleanreg) - A small tool to delete image manifests from a Docker Registry implementing the API v2, dereferencing them for the GC by [@hcguersoy](https://github.com/hcguersoy) -- [Cloudsmith :heavy_dollar_sign:](https://cloudsmith.com/docker-registry/) - A fully managed package management SaaS, with first-class support for public and private Docker registries (and many others, incl. Helm charts for the Kubernetes ecosystem). Has a generous free-tier and is also completely free for open-source. -- [Container Registry Service :heavy_dollar_sign:](https://container-registry.com/) - Harbor based Container Management Solution as a Service for teams and organizations. Free tier offers 1 GB storage for private repositories. -- [Cycle.io :heavy_dollar_sign:](https://cycle.io/) - Bare-metal container hosting. -- [Dist :heavy_dollar_sign:](https://www.dist.cloud/product/container-registry/) - Private cloud-based Docker container registry -- [Docker Hub](https://hub.docker.com/) provided by Docker Inc. -- [Docker Registry v2][distribution] - The Docker toolset to pack, ship, store, and deliver content -- [Docket](https://github.com/netvarun/docket) - Custom docker registry that allows for lightning fast deploys through bittorrent by [@netvarun](https://github.com/netvarun/) -- [GCE Container Registry :heavy_dollar_sign:](https://cloud.google.com/container-registry/) Fast, private Docker image storage on Google Cloud Platform -- [GitLab Container Registry](https://docs.gitlab.com/ee/user/packages/container_registry/) - Registry focused on using its images in GitLab CI -- [Harbor](https://github.com/goharbor/harbor) An open source trusted cloud native registry project that stores, signs, and scans content. Supports replication, user management, access control and activity auditing. By [CNCF](Sandbox) formerly [VMWare] -- [JFrog Artifactory :heavy_dollar_sign:](https://jfrog.com/artifactory/) - Artifact Repository Manager, can be used as private Docker Registry as well -- [Kraken](https://github.com/uber/kraken) - Uber's Highly scalable P2P docker registry, capable of distributing TBs of data in seconds. -- [Portus](https://github.com/SUSE/Portus) - Authorization service and frontend for Docker registry (v2) by [@SUSE](https://github.com/SUSE) -- [Quay.io :heavy_dollar_sign:](https://quay.io/) (part of CoreOS) - Secure hosting for private Docker repositories -- [Registryo](https://github.com/inmagik/registryo) - UI and token based authentication server for onpremise docker registry -- [Rescoyl](https://github.com/noteed/rescoyl) - Private Docker registry (free and open source) by [@noteed](https://github.com/noteed) -- [Sonatype Nexus](https://www.sonatype.com/products/repository-oss) - Repository with Universal Support, also for Docker images -- [TreeScale](https://github.com/treescale) - Build and Distribute container based applications. By [@tigranbs](https://github.com/tigranbs) +### IDE Integrations -## Development with Docker +- JetBrains IDEs (IntelliJ IDEA, GoLand, WebStorm, CLion etc.) has [built-in Docker plugin](https://www.jetbrains.com/help/idea/docker.html#managing-images) +- Eclipse [Docker Tooling plugin](https://www.eclipse.org/community/eclipse_newsletter/2016/july/article2.php) +- [docker.el](https://github.com/Silex/docker.el) Manage docker from Emacs. + +## Developer Workflow ### API Client -- [ahab](https://github.com/instacart/ahab) - Docker event handling with Python by [@instacart](https://github.com/instacart) -- [clj-docker-client](https://github.com/into-docker/clj-docker-client) - Idiomatic Clojure client for the Docker remote API. By [@lispyclouds](https://github.com/lispyclouds) -- [Docker Client for JVM](https://github.com/gesellix/docker-client) - A Docker remote api client library for the JVM, written in Groovy by [@gesellix][gesellix] -- [Docker Client TypeScript](https://gitlab.com/masaeedu/docker-client) - Docker API client for JavaScript, automatically generated from Swagger API definition from moby repository. By [@masaeedu](https://github.com/masaeedu) -- [docker-client](https://github.com/spotify/docker-client) :skull: - Java client for the Docker remote API. By [@spotify][spotify] -- [docker-it-scala](https://github.com/whisklabs/docker-it-scala) - Docker integration testing kit with Scala by [@whisklabs](https://github.com/whisklabs) -- [docker-java-api](https://github.com/amihaiemil/docker-java-api) - Lightweight, truly object-oriented, Java client for Docker's API. By [@amihaiemil](https://github.com/amihaiemil) -- [docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin) - A Maven plugin for running and creating Docker images by [@fabric8io](https://github.com/fabric8io) -- [Docker-PowerShell](https://github.com/Microsoft/Docker-PowerShell) - PowerShell Module for Docker -- [Docker.DotNet](https://github.com/Microsoft/Docker.DotNet) - C#/.NET HTTP client for the Docker remote API by [@ahmetalpbalkan](ahmetalpbalkan) -- [Docker.Registry.DotNet](https://github.com/ChangemakerStudios/Docker.Registry.DotNet) - .NET (C#) Client Library for interacting with a Docker Registry API (v2) [@rquackenbush](https://github.com/rquackenbush) -- [dockerfile-maven](https://github.com/spotify/dockerfile-maven) - A Maven plugin for building and pushing Docker images by [@spotify][spotify] -- [dockerode](https://github.com/apocas/dockerode) - Docker Remote API node.js module by [@apocas](https://github.com/apocas) -- [DoMonit](https://github.com/eon01/DoMonit) - A simple Docker Monitoring wrapper For Docker API -- [go-dockerclient](https://github.com/fsouza/go-dockerclient/) - Go HTTP client for the Docker remote API by [@fsouza](https://github.com/fsouza/) -- [Gradle Docker plugin](https://github.com/gesellix/gradle-docker-plugin) - A Docker remote api plugin for Gradle by [@gesellix][gesellix] -- [libcompose](https://github.com/docker/libcompose) - Go library for Docker Compose. -- [Portainer stack utils](https://github.com/greenled/portainer-stack-utils) :construction: - Bash script to deploy/update/undeploy Docker stacks in a Portainer instance from a docker-compose yaml file. By [@greenled](https://github.com/greenled). -- [sbt-docker-compose](https://github.com/Tapad/sbt-docker-compose) - Integrates Docker Compose functionality into sbt by [@kurtkopchik](https://github.com/kurtkopchik/) -- [sbt-docker](https://github.com/marcuslonnberg/sbt-docker) - Create Docker images directly from sbt by [@marcuslonnberg](https://github.com/marcuslonnberg) +- [contajners](https://github.com/lispyclouds/contajners) - An idiomatic, data-driven, REPL friendly Clojure client for OCI container engines. +- [Docker Client for JVM](https://github.com/gesellix/docker-client) - A Docker remote api client library for the JVM, written in Groovy. +- [Docker Client TypeScript](https://gitlab.com/masaeedu/docker-client) - Docker API client for JavaScript, automatically generated from Swagger API definition from moby repository. +- [docker-controller-bot](https://github.com/dgongut/docker-controller-bot) - Telegram bot to control docker containers. +- [docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin) - A Maven plugin for running and creating Docker images. +- [Docker.DotNet](https://github.com/Microsoft/Docker.DotNet) - C#/.NET HTTP client for the Docker remote API. +- [Docker.Registry.DotNet](https://github.com/ChangemakerStudios/Docker.Registry.DotNet) - .NET (C#) Client Library for interacting with a Docker Registry API (v2). +- [dockerode](https://github.com/apocas/dockerode) - Docker Remote API node.js module. +- [go-dockerclient](https://github.com/fsouza/go-dockerclient/) - Go HTTP client for the Docker remote API. +- [Gradle Docker plugin](https://github.com/gesellix/gradle-docker-plugin) - A Docker remote api plugin for Gradle. +- [Portainer stack utils](https://github.com/greenled/portainer-stack-utils) - Bash script to deploy/update/undeploy Docker stacks in a Portainer instance from a docker-compose yaml file. +- [sbt-docker](https://github.com/marcuslonnberg/sbt-docker) - Create Docker images directly from sbt. ### CI/CD -- [Buddy :heavy_dollar_sign:](https://buddy.works) - The best of Git, build & deployment tools combined into one powerful tool that supercharged our development. -- [Captain](https://github.com/harbur/captain) - Convert your Git workflow to Docker containers ready for Continuous Delivery by [@harbur](https://github.com/harbur). -- [Cyclone](https://github.com/caicloud/cyclone) - Powerful workflow engine and end-to-end pipeline solutions implemented with native Kubernetes resources by [@caicloud](https://github.com/caicloud). -- [Diun](https://github.com/crazy-max/diun) - Receive notifications when an image or repository is updated on a Docker registry by [@crazy-max](crazy-max). +Self-hosted CI engines, build accelerators, and hosted services that target Docker workflows. Commercial entries marked `:yen:`. + +- [Buddy](https://buddy.works) - :yen: The best of Git, build & deployment tools combined into one powerful tool that supercharged our development. +- [Captain](https://github.com/harbur/captain) - Convert your Git workflow to Docker containers ready for Continuous Delivery. +- [CircleCI](https://circleci.com/) - :yen: Push or pull Docker images from your build environment, or build and run containers right on CircleCI. +- [CodeFresh](https://octopus.com/codefresh) - :yen: End-to-end build, test, and share for Docker applications, with automated testing. +- [ConcourseCI](https://concourse-ci.org) - :yen: Pipeline-oriented CI SaaS platform for DevOps teams. +- [Defang](https://github.com/DefangLabs/defang) - Deploy Docker Compose to your favorite cloud in minutes. +- [Depot](https://depot.dev) - :yen: Build Docker images fast, in the cloud. Blazing fast compute, automatic intelligent caching, and zero configuration. +- [Diun](https://github.com/crazy-max/diun) - Receive notifications when an image or repository is updated on a Docker registry. +- [dockcheck](https://github.com/mag37/dockcheck) - A script checking updates for docker images without pulling then auto-update selected/all containers. With notifications, pruning and more. - [Docker plugin for Jenkins](https://github.com/jenkinsci/docker-plugin/) - The aim of the docker plugin is to be able to use a docker host to dynamically provision a slave, run a single build, then tear-down that slave. -- [Dockupdater](https://github.com/dockupdater/dockupdater) - Automatically keep your docker services and your docker containers up-to-date - [Drone](https://github.com/drone/drone) - Continuous integration server built on Docker and configured using YAML files. +- [Gantry](https://github.com/shizunge/gantry) - Automatically update selected Docker swarm services. - [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) - GitLab has integrated CI to test, build and deploy your code with the use of GitLab runners. -- [GOCD-Docker](https://github.com/gocd/gocd-docker) :skull: - Go Server and Agent in docker containers to provision. -- [Microservices Continuous Deployment](https://github.com/francescou/docker-continuous-deployment) - Continuous deployment of a microservices application. -- [mu](https://github.com/stelligent/mu) - Tool to configure CI/CD of your container applications via AWS CodePipeline, CodeBuild and ECS [@Stelligent](https://github.com/stelligent) -- [Ouroboros](https://github.com/pyouroboros/ouroboros) :skull: - Automatically update running Docker containers with notifications -- [Popper](https://github.com/systemslab/popper) - Github actions workflow (HCL syntax) execution engine. -- [Screwdriver :heavy_dollar_sign:](https://screwdriver.cd/) - Yahoo's OpenSource buildplatform designed for Continous Delivery. -- [Skipper](https://github.com/Stratoscale/skipper) - Easily dockerize your Git repository by [@Stratoscale](https://github.com/Stratoscale) -- [SwarmCI](https://github.com/ghostsquad/swarmci) - Create a distributed, isolated task pipeline in your Docker Swarm. -- [Watchtower](https://github.com/containrrr/watchtower) - Automatically update running Docker containers +- [Jaypore CI](https://github.com/theSage21/jaypore_ci) - Simple, very flexible, powerful CI / CD / automation system configured in Python. Offline and local first. +- [Kraken CI](https://github.com/Kraken-CI/kraken) - Modern CI/CD, open-source, on-premise system that is highly scalable and focused on testing. One of its executors is Docker. Developed. +- [Screwdriver](https://screwdriver.cd/) - :yen: Yahoo's OpenSource buildplatform designed for Continous Delivery. +- [Self Hosted Runner](https://github.com/youssefbrr/self-hosted-runner) - Dockerized solution for setting up a self-hosted GitHub Actions runner with support for Linux, macOS, and Windows. +- [Semaphore CI](https://semaphore.io/) - :yen: High-performance cloud CI that builds, tests and ships containers to production. +- [Skipper](https://github.com/Stratoscale/skipper) - Easily dockerize your Git repository. +- [Tekton CD](https://tekton.dev/) - A cloud-native pipeline resource. +- [TravisCI](https://www.travis-ci.com/) - :yen: Hosted CI for GitHub projects with Docker support. ### Development Environment -- [batect](https://github.com/batect/batect) - build and testing environments as code tool: Dockerised build and testing environments made easy by [@charleskorn](https://github.com/charleskorn) -- [Binci](https://github.com/binci/binci) - Containerize your development workflow. (formerly DevLab by [@TechnologyAdvice](https://github.com/TechnologyAdvice)) -- [Boot2Docker](https://github.com/boot2docker/boot2docker) :skull: - Docker for OSX and Windows -- [construi](https://github.com/lstephen/construi) - Run your builds inside a Docker defined environment by [@lstephen](https://github.com/lstephen) -- [Crashcart](https://github.com/oracle/crashcart) - Sideload Linux binaries into a running container for troubleshooting by [@Oracle][oracle] -- [dde](https://github.com/whatwedo/dde) :construction: - Local development environment toolset based on Docker. By [@whatwedo](https://github.com/whatwedo) -- [Devstep](https://github.com/fgrehm/devstep) :skull: - Development environments powered by Docker and buildpacks by [@fgrehm][fgrehm] -- [Dinghy](https://github.com/codekitchen/dinghy) - An alternative way to use Docker on Mac OS X using Docker Machine with virtualbox, vmware, xhyve or parallels -- [DIP](https://github.com/bibendi/dip) - CLI utility for straightforward provisioning and interacting with an application configured by docker-compose. By [@bibendi](https://github.com/bibendi) -- [DLite](https://github.com/nlf/dlite) :skull: - Simplest way to use Docker on OSX, no VM needed. By [@nlf](https://github.com/nlf) -- [dobi](https://github.com/dnephin/dobi) - A build automation tool for Docker applications. By [@dnephin](https://github.com/dnephin) -- [Docker Missing Tools](https://github.com/nandoquintana/docker-missing-tools) - A set of bash commands to shortcut typical docker dev-ops. An alternative to creating typical helper scripts like "build.sh" and "deploy.sh" inside code repositories. By [@NandoQuintana](https://github.com/nandoquintana). -- [Docker osx dev](https://github.com/brikis98/docker-osx-dev) :skull: - A productive development environment with Docker on OS X by [@brikis98](https://github.com/brikis98) -- [Docker-Arch](https://github.com/Ph3nol/Docker-Arch) - Generate Web/CLI projects Dockerized development environments, from 1 simple YAML file. By [@Ph3nol](https://github.com/ph3nol) -- [Docker-sync](https://github.com/EugenMayer/docker-sync) - Drastically improves performance ([50-70x](https://github.com/EugenMayer/docker-sync/wiki/4.-Performance)) when using Docker for development on Mac OS X/Windows and Linux while sharing code to the container. By [@EugenMayer](https://github.com/EugenMayer) -- [docker-vm](https://github.com/shyiko/docker-vm) - Simple and transparent alternative to boot2docker (backed by Vagrant) by [@shyiko](https://github.com/shyiko) -- [DockerBuildManagement](https://github.com/DIPSAS/DockerBuildManagement) - Build Management is a python application, installed with pip. The application makes it easy to manage a build system based on Docker by configuring a single yaml file describing how to build, test, run or publish a containerized solution. -- [Dusty](https://github.com/gamechanger/dusty) - Managed Docker development environments on OS X -- [Eclipse Che](https://github.com/eclipse/che) - Developer workspace server with Docker runtimes, cloud IDE, next-generation Eclipse IDE -- [EnvCLI](https://github.com/EnvCLI/EnvCLI) - Replace your local installation of Node, Go, ... with project-specific docker containers. By [@EnvCLI](https://github.com/EnvCLI) -- [footloose](https://github.com/weaveworks/footloose) - Spin containers that look like Virtual Machines - By [@dlespiau](https://github.com/dlespiau) -- [forward2docker](https://github.com/bsideup/forward2docker) :skull: - Utility to auto forward a port from localhost into ports on Docker containers running in a boot2docker VM by [@bsideup](https://github.com/bsideup) +- [coder](https://github.com/coder/coder) - Remote development machines powered by Terraform or Docker. +- [dde](https://github.com/whatwedo/dde) - Local development environment toolset based on Docker. +- [DIP](https://github.com/bibendi/dip) - CLI utility for straightforward provisioning and interacting with an application configured by docker-compose. +- [EnvCLI](https://github.com/EnvCLI/EnvCLI) - Replace your local installation of Node, Go, ... with project-specific docker containers. - [Gebug](https://github.com/moshebe/gebug) - A tool that makes debugging of Dockerized Go applications super easy by enabling Debugger and Hot-Reload features, seamlessly. -- [Lando](https://github.com/lando/lando) - Lando is for developers who want to quickly specify and painlessly spin up the services and tools needed to develop their projects. By [Tandem](https://thinktandem.io/) -- [Vagga](https://github.com/tailhook/vagga) - Vagga is a containerisation tool without daemons. It is a fully-userspace container engine inspired by Vagrant and Docker, specialized for development environments by [@tailhook](https://github.com/tailhook/) -- [Zsh-in-Docker](https://github.com/deluan/zsh-in-docker) - Install Zsh, Oh-My-Zsh and plugins inside a Docker container with one line! By [Deluan](https://www.deluan.com) - -### Garbage Collection - -- [caduc](https://github.com/tjamet/caduc) - A docker garbage collector cleaning stuff you did not use recently -- [Docker Clean](https://github.com/ZZROTDesign/docker-clean) - A script that cleans Docker containers, images and volumes by [@zzrotdesign](https://github.com/ZZROTDesign) -- [docker_gc](https://github.com/pdacity/docker_gc) - Image for automatic removing unused Docker Swarm objects. Also works just as Docker Service by [@pdacity](https://github.com/pdacity) -- [Docker-cleanup](https://github.com/meltwater/docker-cleanup) :skull: - Automatic Docker image, container and volume cleanup by [@meltwater](https://github.com/meltwater) -- [docker-custodian](https://github.com/Yelp/docker-custodian) - Keep docker hosts tidy. By [@Yelp](https://github.com/Yelp) -- [docker-garby](https://github.com/konstruktoid/docker-garby) - Docker garbage collection script by [@konstruktoid](https://github.com/konstruktoid). -- [docker-gc](https://github.com/spotify/docker-gc) :skull: - A cron job that will delete old stopped containers and unused images by [@spotify][spotify] -- [sherdock](https://github.com/rancher/sherdock) :skull: - Automatic GC of images based on regexp by [@rancher][rancher] +- [HarborPilot](https://github.com/potterwhite/HarborPilot) - Automated multi-platform Docker image builder for embedded Linux development (RK3588, RV1126, RK3568). Features three-layer config inheritance, PORT_SLOT-based port allocation, and cross-version Ubuntu support (20.04/22.04/24.04). +- [Lando](https://github.com/lando/lando) - Lando is for developers who want to quickly specify and painlessly spin up the services and tools needed to develop their projects. +- [uniget](https://github.com/uniget-org/cli) - Uni(versal)get, the installer and updater for container tools and beyond (formerly docker-setup). +- [Zsh-in-Docker](https://github.com/deluan/zsh-in-docker) - Install Zsh, Oh-My-Zsh and plugins inside a Docker container with one line!. ### Serverless -- [AMP](https://github.com/appcelerator-archive/amp) :skull: - The open source unified CaaS/FaaS platform for Docker, batteries included. By [@Appcelerator](https://github.com/appcelerator-archive) -- [Apache OpenWhisk](https://github.com/apache/openwhisk) - a serverless, open source cloud platform that executes functions in response to events at any scale. By [@apache](https://github.com/apache) -- [Docker-Lambda](https://github.com/lambci/docker-lambda) - Docker images and test runners that replicate the live AWS Lambda environment. By [@lamb-ci](https://github.com/lambci) -- [Funker](https://github.com/bfirsh/funker-example-voting-app) - Functions as Docker containers example voting app. By [@bfirsh](https://github.com/bfirsh) -- [IronFunctions](https://github.com/iron-io/functions) - The serverless microservices platform FaaS (Funcitons as a Service) which uses Docker containers to run Any language or AWS Lambda functions -- [Koyeb](https://www.koyeb.com/) :heavy_dollar_sign: - Koyeb is a developer-friendly serverless platform to deploy apps globally. Seamlessly run Docker containers, web apps, and APIs with git-based deployment, native autoscaling, a global edge network, and built-in service mesh and discovery. -- [OpenFaaS](https://github.com/openfaas/faas) - A complete serverless functions framework for Docker and Kubernetes. By [OpenFaaS](https://github.com/openfaas) -- [SCAR](https://github.com/grycap/scar) - Serverless Container-aware Architectures (SCAR) is a serverless framework that allows easy deployment and execution of containers (e.g. Docker) in Serverless environments (e.g. Lambda) by [@grycap](https://github.com/grycap) +- [Apache OpenWhisk](https://github.com/apache/openwhisk) - A serverless, open source cloud platform that executes functions in response to events at any scale. +- [Koyeb](https://www.koyeb.com/) - :yen: Koyeb is a developer-friendly serverless platform to deploy apps globally. Seamlessly run Docker containers, web apps, and APIs with git-based deployment, native autoscaling, a global edge network, and built-in service mesh and discovery. +- [OpenFaaS](https://github.com/openfaas/faas) - A complete serverless functions framework for Docker and Kubernetes. ### Testing -- [Container Structure Test](https://github.com/GoogleContainerTools/container-structure-test) - A framework to validate the structure of an image by checking the outputs of commands or the contents of the filesystem. By [@GoogleContainerTools][googlecontainertools] -- [dgoss](https://github.com/aelsabbahy/goss/tree/master/extras/dgoss) - A fast YAML based tool for validating docker containers. -- [DockerSpec](https://github.com/zuazo/dockerspec) - A small Ruby Gem to run RSpec and Serverspec, Infrataster and Capybara tests against Dockerfiles or Docker images easily. By [@zuazo](https://github.com/zuazo) -- [Dockunit](https://github.com/dockunit/platform) :skull: - Docker based integration tests. A simple Node based utility for running Docker based unit tests. By [@dockunit](https://github.com/dockunit) -- [InSpec][inspec] - InSpec is an open-source testing framework for infrastructure with a human- and machine-readable language for specifying compliance, security and policy requirements. By [@chef](https://github.com/chef) -- [Pull Dog](https://github.com/apps/pull-dog) - A GitHub app that automatically creates Docker-based test environments for your pull requests, from your docker-compose files. Not open source. -- [Pumba](https://github.com/alexei-led/pumba) - Chaos testing tool for Docker. Can be deployed on kubernetes and CoreOS cluster. By [@alexei-led](https://github.com/alexei-led) +- [Container Structure Test](https://github.com/GoogleContainerTools/container-structure-test) - A framework to validate the structure of an image by checking the outputs of commands or the contents of the filesystem. +- [dgoss](https://github.com/goss-org/goss/tree/master/extras/dgoss) - A fast YAML based tool for validating docker containers. +- [Kurtosis](https://github.com/kurtosis-tech/kurtosis) - A composable build system for multi-container test environments that provides developers with: a powerful Python-like SDK for environment configuration, a compile-time validator to verify environment behavior & setup, and a runtime for environment execution, monitoring, & debugging capabilities. +- [Pumba](https://github.com/alexei-led/pumba) - Chaos testing tool for Docker. Can be deployed on kubernetes and CoreOS cluster. ### Wrappers -- [Ansible](https://docs.ansible.com/ansible/latest/collections/community/general/docker_container_module.html) - Manage the life cycle of Docker containers. By RedHat -- [Azk](https://github.com/azukiapp/azk) - Orchestrate development environments on your local machine by [@azukiapp](https://github.com/azukiapp) -- [Beluga](https://github.com/cortexmedia/Beluga) :skull: - CLI to deploy docker containers on a single server or low amount of servers. By [@cortextmedia](https://github.com/cortexmedia) -- [dexec](https://github.com/docker-exec/dexec) - Command line interface written in Go for running code with Docker Exec images. -- [dockerized](https://github.com/benzaita/dockerized-cli) - Seamlessly execute commands in a container. -- [Dray](https://github.com/CenturyLinkLabs/dray) - An engine for managing the execution of container-based workflows by [@CenturyLinkLabs][centurylinklabs] -- [FuGu](https://github.com/mattes/fugu) :skull: - Docker run wrapper without orchestration by [@mattes](https://github.com/mattes) -- [Shutit](https://github.com/ianmiell/shutit) - Tool for building and maintaining complex Docker deployments by [@ianmiell](https://github.com/ianmiell) -- [subuser](https://github.com/subuser-security/subuser) - Makes it easy to securely and portably run graphical desktop applications in Docker -- [T.A.D.S. boilerplate](https://github.com/Thomvaill/tads-boilerplate) - The power of Ansible and Terraform + the simplicity of Docker Swarm = Infrastructure as Code and DevOps best practices. By [@Thomvaill](https://github.com/Thomvaill) -- [Terraform cloud-init config](https://github.com/christippett/terraform-cloudinit-container-server) - Terraform module for deploying a single Docker image or `docker-compose.yaml` file to any Cloud™ VM -- [Turbo](https://github.com/ramitsurana/turbo) - Simple and Powerful utility for docker. By [@ramitsurana][ramitsurana] -- [udocker](https://github.com/indigo-dc/udocker) - A tool to execute simple docker containers in batch or interactive systems without root privileges by [@inidigo-dc](https://github.com/indigo-dc) -- [Vagrant - Docker provider](https://www.vagrantup.com/docs/providers/docker/basics) - Good starting point is [vagrant-docker-example](https://github.com/bubenkoff/vagrant-docker-example) by [@bubenkoff](https://github.com/bubenkoff) - -## Services based on Docker (mostly :heavy_dollar_sign:) - -### CI Services - -- [CircleCI](https://circleci.com/) :heavy_dollar_sign: - Push or pull Docker images from your build environment, or build and run containers right on CircleCI. -- [CodeFresh](https://codefresh.io) :heavy_dollar_sign: - Everything you need to build, test, and share your Docker applications. Provides automated end to end testing. -- [CodeShip](https://www.cloudbees.com/products/codeship) :heavy_dollar_sign: - Work with your established Docker workflows while automating your testing and deployment tasks with our hosted platform dedicated to speed and security. -- [ConcourseCI](https://concourse-ci.org) :heavy_dollar_sign: - A CI SaaS platform for developers and DevOps teams pipeline oriented. -- [Semaphore CI](https://semaphoreci.com/) :heavy_dollar_sign: — A high-performance cloud solution that makes it easy to build, test and ship your containers to production. -- [Shippable](https://app.shippable.com/) :heavy_dollar_sign: - A SaaS platform for developers and DevOps teams that significantly reduces the time taken for code to be built, tested and deployed to production. -- [TravisCI](https://travis-ci.org/) :heavy_dollar_sign: - A Free github projects continuous integration Saas platform for developers and Devops. - -### CaaS - -- [Amazon ECS](https://aws.amazon.com/ecs/) :heavy_dollar_sign: - A management service on EC2 that supports Docker containers. -- [Appfleet](https://appfleet.com/) :heavy_dollar_sign: - Edge platform to deploy and manage containerized services globally. The system will route the traffic to the closest location for lower latency. -- [Azure AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/) :heavy_dollar_sign: - Simplify Kubernetes management, deployment, and operations. Use a fully managed Kubernetes container orchestration service. -- [Cloud 66](https://www.cloud66.com) :heavy_dollar_sign: - Full-stack hosted container management as a service -- [Dockhero](https://dockhero.io/) :heavy_dollar_sign: - Dockhero is a Heroku add-on which turns a Docker image into a microservice attached to the Heroku app. Currently in beta. -- [Giant Swarm](https://www.giantswarm.io/) :heavy_dollar_sign: - Simple microservice infrastructure. Deploy your containers in seconds. -- [Google Container Engine](https://cloud.google.com/kubernetes-engine/docs/) :heavy_dollar_sign: - Docker containers on Google Cloud Computing powered by [Kubernetes][kubernetes]. -- [Jelastic Cloud](https://jelastic.cloud/) :heavy_dollar_sign: - "Easy-to-use" container hosting platfrom with automatic vertical and horizontal scaling. Available over 50+ hosting providers worldwide. -- [Mesosphere DC/OS Platform](https://d2iq.com/products/dcos) :heavy_dollar_sign: - Integrated platform for data and containers built on Apache Mesos by [@mesosphere](https://d2iq.com) -- [Red Hat CodeReady Workspaces](https://developers.redhat.com/products/codeready-workspaces/overview) - A collaborative Kubernetes-native solution for rapid application development that delivers consistent developer environments on Red Hat OpenShift to allow anyone with a browser to contribute code in under two minutes. -- [Red Hat OpenShift Dedicated](https://cloud.redhat.com/products/dedicated/) :heavy_dollar_sign: - Fully-managed Red Hat® OpenShift® service on Amazon Web Services and Google Cloud -- [Sloppy.io](https://sloppy.io/en/) :heavy_dollar_sign: - all-in-one solution for container deployment and hosting – made and hosted in Germany -- [Triton](https://www.joyent.com/) :heavy_dollar_sign: - Elastic container-native infrastructure by Joyent. - -### Monitoring Services - -- [AppDynamics](https://github.com/Appdynamics/docker-monitoring-extension) - Docker Monitoring extension gathers metrics from the Docker Remote API, either using Unix Socket or TCP. -- [Broadcom Docker Monitoring](https://www.broadcom.com/info/aiops/docker-monitoring) :heavy_dollar_sign: - Agile Operations solutions from Broadcom deliver the modern Docker monitoring businesses need to accelerate and optimize the performance of microservices and the dynamic Docker environments running them. Monitor both the Docker environment and apps that run inside them. (former CA Technologies) -- [Collecting docker logs and stats with Splunk](https://www.splunk.com/en_us/blog/tips-and-tricks/collecting-docker-logs-and-stats-with-splunk.html) -- [Datadog](https://www.datadoghq.com/) :heavy_dollar_sign: - Datadog is a full-stack monitoring service for large-scale cloud environments that aggregates metrics/events from servers, databases, and applications. It includes support for Docker, Kubernetes, and Mesos. -- [Prometheus](https://prometheus.io/) :heavy_dollar_sign: - Open-source service monitoring system and time series database -- [Site24x7](https://www.site24x7.com/docker-monitoring.html) :heavy_dollar_sign: - Docker Monitoring for DevOps and IT is a SaaS Pay per Host model -- [SPM for Docker](https://github.com/sematext/sematext-agent-docker) :heavy_dollar_sign: - Monitoring of host and container metrics, Docker events and logs. Automatic log parser. Anomaly Detection and alerting for metrics and logs. [@sematext](https://github.com/sematext) -- [Sysdig Monitor](https://sysdig.com/products/monitor/) :heavy_dollar_sign: - Sysdig Monitor can be used as either software or a SaaS service to monitor, alert, and troubleshoot containers using system calls. It has container-specific features for Docker and Kubernetes. - -# Useful Resources - -- **[Valuable Docker Links](http://nane.kratzke.pages.mylab.th-luebeck.de/about/blog/2014/08/24/valuable-docker-links/)** High quality articles about docker! **MUST SEE** -- [Become a Docker Power User with Visual Studio Code](https://www.thebyte.io/become-docker-power-user-with-vs-code) - :heavy_dollar_sign: A training course to help you become a Docker Power user with Visual Studio Code +- [Hokusai](https://github.com/artsy/hokusai) - A Docker + Kubernetes CLI for application developers; used to containerize an application and to manage its lifecycle throughout development, testing, and release cycles. From [artsy](https://github.com/artsy). +- [Preevy](https://github.com/livecycle/preevy) - Preview environments for Docker and Docker Compose projects. Test your changes and get feedback from devs and non-devs (Product/Design) by deploying pull requests to the your cloud provider as part of your CI pipeline. +- [subuser](https://github.com/subuser-security/subuser) - Makes it easy to securely and portably run graphical desktop applications in Docker. +- [udocker](https://github.com/indigo-dc/udocker) - A tool to execute simple docker containers in batch or interactive systems without root privileges. +- [Vagrant - Docker provider](https://developer.hashicorp.com/vagrant/docs/providers/docker/basics) - Good starting point is [vagrant-docker-example](https://github.com/bubenkoff/vagrant-docker-example). + +## In-Container Tooling + +Tools and applications that are either installed inside containers or designed to be run as a [sidecar](https://learn.microsoft.com/en-us/azure/architecture/patterns/sidecar) + +- [cdebug](https://github.com/iximiuz/cdebug) - Swiss-army knife for debugging running containers via ephemeral sidecars; works with Docker, containerd, and Kubernetes. +- [ckron](https://github.com/nicomt/ckron) - A cron-style job scheduler for docker,. +- [CoreOS][coreos] - Linux for Massive Server Deployments +- [docker-gen](https://github.com/jwilder/docker-gen) - Generate files from docker container meta-data. +- [dockerize](https://github.com/powerman/dockerize) - Utility to simplify running applications in docker containers. +- [GoSu](https://github.com/tianon/gosu) - Run this specific application as this specific user and get out of the pipeline (entrypoint script tool). +- [is-docker](https://github.com/sindresorhus/is-docker) - Check if the process is running inside a Docker container. +- [microcheck](https://github.com/tarampampam/microcheck) - Lightweight health check utilities for Docker containers (75 KB instead of 9.3 MB for httpcheck versus cURL) in pure C - http(s), port checks, and parallel execution are included. +- [Ofelia](https://github.com/mcuadros/ofelia/) - Ofelia is a modern and low footprint job scheduler for docker environments, built on Go. Ofelia aims to be a replacement for the old fashioned cron. Supports configuration from container labels and/or configuration files. +- [su-exec](https://github.com/ncopa/su-exec) - This is a simple tool that will simply execute a program with different privileges. The program will be executed directly and not run as a child, like su and sudo does, which avoids TTY and signal issues. Why reinvent gosu? This does more or less exactly the same thing as gosu but it is only 10kb instead of 1.8MB. +- [supercronic](https://github.com/aptible/supercronic) - Crontab-compatible job runner, designed specifically to run in containers. + +# Learning Resources + +## Where to Start + +- [Benefits of using Docker](https://semaphore.io/blog/docker-benefits) for development and delivery, with a practical roadmap for adoption. +- [Bootstrapping Microservices](https://www.manning.com/books/bootstrapping-microservices-with-docker-kubernetes-and-terraform) - A practical and project-based guide to building applications with microservices, starts by building a Docker image for a single microservice and publishing it to a private container registry, finishes by deploying a complete microservices application to a production Kubernetes cluster. +- [Docker Curriculum](https://github.com/prakhar1989/docker-curriculum): A comprehensive tutorial for getting started with Docker. Teaches how to use Docker and deploy dockerized apps on AWS with Elastic Beanstalk and Elastic Container Service. +- [Docker Documentation](https://docs.docker.com/): the official documentation. +- [Docker for beginners](https://github.com/groda/big_data/blob/master/docker_for_beginners.md): A tutorial for beginners who need to learn the basics of Docker—from "Hello world!" to basic interactions with containers, with simple explanations of the underlying concepts. +- [Docker for novices](https://www.youtube.com/watch?v=xsjSadjKXns) An introduction to Docker for developers and testers who have never used it. (Video 1h40, recorded linux.conf.au 2019 — Christchurch, New Zealand) +- [Docker katas](https://github.com/eficode-academy/docker-katas) A series of labs that will take you from "Hello Docker" to deploying a containerized web application to a server. +- [Docker simplified in 55 seconds](https://www.youtube.com/watch?v=vP_4DlOH1G4): An animated high-level introduction to Docker. Think of it as a visual tl;dr that makes it easier to dive into more complex learning materials. +- [Docker Training](https://training.mirantis.com) - :yen: +- [Dockerlings](https://github.com/furkan/dockerlings): Learn docker from inside your terminal, with a modern TUI and bite sized exercises. +- [Introduction à Docker](https://blog.stephane-robert.info/docs/conteneurs/moteurs-conteneurs/docker/) A dedicated section to master Docker on a French site about DevSecOps: From the basics to best practices, including optimizing, securing your containers... +- [Learn Docker](https://github.com/dwyl/learn-docker): step-by-step tutorial and more resources (video, articles, cheat sheets) +- [Learn Docker (Visually)](https://pagertree.com/learn/docker/overview) - A beginner-focused high-level overview of all the major components of Docker and how they fit together. Lots of high-quality images, examples, and resources. +- [Play With Docker](https://training.play-with-docker.com/): PWD is a great way to get started with Docker from beginner to advanced users. Docker runs directly in your browser. +- [Practical Guide about Docker Commands in Spanish](https://github.com/brunocascio/docker-espanol) This Spanish guide contains the use of basic docker commands with real life examples. +- [Setting Python Development Environment with VScode and Docker](https://github.com/RamiKrispin/vscode-python): A step-by-step tutorial for setting up a dockerized Python development environment with VScode, Docker, and the Dev Container extension. +- [The Docker Handbook](https://docker-handbook.farhan.dev/) An open-source book that teaches you the fundamentals, best practices and some intermediate Docker functionalities. The book is hosted on [fhsinchy/the-docker-handbook](https://github.com/fhsinchy/the-docker-handbook) and the projects are hosted on [fhsinchy/docker-handbook-projects](https://github.com/fhsinchy/docker-handbook-projects) repository. + +**Cheatsheets** + +- [eon01](https://github.com/eon01/DockerCheatSheet) +- [dimonomid](https://github.com/dimonomid/docker-quick-ref) (PDF) +- [JensPiegsa](https://github.com/JensPiegsa/docker-cheat-sheet) +- [wsargent](https://github.com/wsargent/docker-cheat-sheet) (Most popular) + +## Where to Start (Windows) + +- [Docker on Windows behind a firewall](https://toedter.com/2015/05/11/docker-on-windows-behind-a-firewall/) +- [Docker Reference Architecture: Modernizing Traditional .NET Framework Applications](https://docs.mirantis.com/containers/v3.0/dockeree-ref-arch/app-dev/modernize-dotnet-apps.html) - You will learn to identify the types of .NET Framework applications that are good candidates for containerization, the "lift-and-shift" approach to containerization. +- [Docker with Microsoft SQL 2016 + ASP.NET](https://blog.alexellis.io/docker-does-sql2016-aspnet/) Demonstration running ASP.NET and SQL Server workloads in Docker +- [Exploring ASP.NET Core with Docker in both Linux and Windows Containers](https://www.hanselman.com/blog/exploring-aspnet-core-with-docker-in-both-linux-and-windows-containers) Running ASP.NET Core apps in Linux and Windows containers, using [Docker for Windows][docker-for-windows] +- [Running a Legacy ASP.NET App in a Windows Container](https://blog.sixeyed.com/dockerizing-nerd-dinner-part-1-running-a-legacy-asp-net-app-in-a-windows-container/) Steps for Dockerizing a legacy ASP.NET app and running as a Windows container +- [Windows Containers and Docker: The 101](https://www.youtube.com/watch?v=N7SG2wEyQtM) - A 20-minute overview, using Docker to run PowerShell, ASP.NET Core and ASP.NET apps. +- [Windows Containers Quick Start](https://learn.microsoft.com/en-us/virtualization/windowscontainers/about/) Overview of Windows containers, drilling down to Quick Starts for Windows 10 and Windows Server 2016 + +--- + +## Books & Tutorials + - [Cloud Native Landscape](https://github.com/cncf/landscape) -- [Docker Certification](https://intellipaat.com/docker-training-course/) :heavy_dollar_sign: will help you to will Learn Docker containerization, running Docker containers, Image creation, Dockerfile, Docker orchestration, security best practices, and more through hands-on projects and case studies and helps to clear Docker Certified Associate. -- [Docker Community on Hashnode](https://hashnode.com/n/docker) -- [Docker dev bookmarks](https://www.codever.land/search?q=docker) - use the tag [docker](https://www.codever.land/bookmarks/t/docker) +- [Docker Blog](https://www.docker.com/blog/) - Regular updates about Docker, the community and tools. +- [Docker Certification](https://intellipaat.com/docker-training-course/?US) - :yen: Will help you to will Learn Docker containerization, running Docker containers, Image creation, Dockerfile, Docker orchestration, security best practices, and more through hands-on projects and case studies and helps to clear Docker Certified Associate. +- [Docker dev bookmarks](https://www.codever.dev/search?q=docker) - Use the tag [docker](https://www.codever.dev/bookmarks/t/docker). - [Docker in Action, Second Edition](https://www.manning.com/books/docker-in-action-second-edition) - [Docker in Practice, Second Edition](https://www.manning.com/books/docker-in-practice-second-edition) -- [Docker Newsletter](https://www.docker.com/newsletter-subscription) Docker newsletter for regular updates -- [Docker packaging guide for Python](https://pythonspeed.com/docker/) - a series of detailed articles on the specifics of Docker packaging for Python. +- [Docker packaging guide for Python](https://pythonspeed.com/docker/) - A series of detailed articles on the specifics of Docker packaging for Python. - [Learn Docker in a Month of Lunches](https://www.manning.com/books/learn-docker-in-a-month-of-lunches) -- [Learn Docker](https://blog.coursesity.com/best-docker-tutorials/) - Learn Docker - curated list of the top online docker tutorials and courses. +- [Learn Docker](https://coursesity.com/blog/best-docker-tutorials/) - Learn Docker - curated list of the top online docker tutorials and courses. - [Programming Community Curated Resources for learning Docker](https://hackr.io/tutorials/learn-docker) - ## Awesome Lists -- [Awesome CI/CD](https://github.com/cicdops/awesome-ciandcd) - Not specific to docker but relevant. -- [Awesome Compose](https://github.com/docker/awesome-compose) - Docker Compose samples -- [Awesome Kubernetes](https://github.com/ramitsurana/awesome-kubernetes) by [@ramitsurana][ramitsurana] -- [Awesome Linux Container](https://github.com/Friz-zy/awesome-linux-containers) more general about container than this repo, by [@Friz-zy](https://github.com/Friz-zy). -- [Awesome Selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted) list of Free Software network services and web applications which can be hosted locally by running in a classical way (setup local web server and run applications from there) or in a Docker container. By [@Kickball](https://github.com/Kickball) -- [Awesome Sysadmin](https://github.com/n1trux/awesome-sysadmin) by [@n1trux](https://github.com/n1trux) -- [ToolsOfTheTrade](https://github.com/cjbarber/ToolsOfTheTrade) a list of SaaS and On premise applications by [@cjbarber](https://github.com/cjbarber) +- [Awesome Compose](https://github.com/docker/awesome-compose) - Docker Compose samples. +- [Awesome Kubernetes](https://github.com/ramitsurana/awesome-kubernetes) +- [Awesome Linux Container](https://github.com/Friz-zy/awesome-linux-containers) more general about container than this repo. +- [Awesome Selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted) list of Free Software network services and web applications which can be hosted locally by running in a classical way (setup local web server and run applications from there) or in a Docker container. +- [Awesome Sysadmin](https://github.com/n1trux/awesome-sysadmin) +- [ToolsOfTheTrade](https://github.com/cjbarber/ToolsOfTheTrade) a list of SaaS and On premise applications ## Demos and Examples - [An Annotated Docker Config for Frontend Web Development](https://nystudio107.com/blog/an-annotated-docker-config-for-frontend-web-development) A local development environment with Docker allows you to shrink-wrap the devops your project needs as config, making onboarding frictionless. -- [Local Docker DB](https://github.com/alexmacarthur/local-docker-db) a list of docker-compose samples for a lot of databases by [@alexmacarthur](https://github.com/alexmacarthur) +- [Local Docker DB](https://github.com/alexmacarthur/local-docker-db) a list of docker-compose samples for a lot of databases - [Webstack-micro](https://github.com/ferbs/webstack-micro) Demo web app showing how Docker Compose might be used to set up an API Gateway, centralized authentication, background workers, and WebSockets as containerized services. ## Good Tips -- [Dealing with linked containers dependency in docker-compose](http://brunorocha.org/python/dealing-with-linked-containers-dependency-in-docker-compose.html) by [@rochacbruno](https://github.com/rochacbruno) -- [Docker Caveats](http://docker-saigon.github.io/post/Docker-Caveats/) What You Should Know About Running Docker In Production (written 11 APRIL 2016) **MUST SEE** -- [Docker Containers on the Desktop](https://blog.jessfraz.com/post/docker-containers-on-the-desktop/) - The **funniest way** to learn about docker by [@jessfraz][jessfraz] who also gave a [presentation](https://www.youtube.com/watch?v=1qlLUf7KtAw) about it @ DockerCon 2015 -- [Docker vs. VMs? Combining Both for Cloud Portability Nirvana](https://www.flexera.com/blog/cloud/docker-vs-vms-combining-both-for-cloud-portability-nirvana/) -- [Dockerfile best practices](https://github.com/hexops/dockerfile) - This repository has best-practices for writing Dockerfiles -- [Don't Repeat Yourself with Anchors, Aliases and Extensions in Docker Compose Files](https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd) by [@King Chung Huang](https://github.com/kinghuang) -- [GUI Apps with Docker](http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/) by [@fgrehm][fgrehm] +- [Docker Caveats](https://docker-saigon.github.io/post/Docker-Caveats/) What You Should Know About Running Docker In Production (written 11 APRIL 2016). +- [Docker Containers on the Desktop](https://blog.jessfraz.com/post/docker-containers-on-the-desktop/) +- [Docker vs. VMs? Combining Both for Cloud Portability Nirvana](https://www.flexera.com/blog/finops/) +- [Don't Repeat Yourself with Anchors, Aliases and Extensions in Docker Compose Files](https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd) +- [GUI Apps with Docker](https://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/) ## Raspberry Pi & ARM @@ -754,120 +602,73 @@ Services to securely store your Docker images. - [git push docker containers to linux devices](https://www.balena.io) Modern DevOps for IoT, leveraging git and Docker. - [Installing, running, using Docker on armhf (ARMv7) devices](https://github.com/umiddelb/armhf/wiki/Installing,-running,-using-docker-on-armhf-%28ARMv7%29-devices) -## Security +## Security Articles - [Bringing new security features to Docker](https://opensource.com/business/14/9/security-for-docker) -- [CVE Scanning Alpine images with Multi-stage builds in Docker 17.05](https://github.com/tomwillfixit/alpine-cvecheck) by [@tomwillfixit](https://twitter.com/tomwillfixit) +- [CVE Scanning Alpine images with Multi-stage builds in Docker 17.05](https://github.com/tomwillfixit/alpine-cvecheck) - [Docker Secure Deployment Guidelines](https://github.com/AonCyberLabs/Docker-Secure-Deployment-Guidelines) - [Docker Security - Quick Reference](https://binarymist.io/publication/docker-security/) -- [Docker Security Cheat Sheet](https://github.com/konstruktoid/Docker/blob/master/Security/CheatSheet.adoc) -- [Docker Security: Are Your Containers Tightly Secured to the Ship? SlideShare](https://fr.slideshare.net/MichaelBoelen/docker-security-are-your-containers-tightly-secured-to-the-ship) +- [Docker Security: Are Your Containers Tightly Secured to the Ship? SlideShare](https://www.slideshare.net/slideshow/docker-security-are-your-containers-tightly-secured-to-the-ship/43834790) - [How CVE's are handled on Offical Docker Images](https://github.com/docker-library/official-images/issues/1448) - [Lynis is an open source security auditing tool including Docker auditing](https://cisofy.com/lynis/) -- [Security Best Practices for Building Docker Images](https://linux-audit.com/tag/docker/) +- [Security Best Practices for Building Docker Images](https://linux-audit.com/tags/docker/) - [Software Engineering Radio interview of Docker Security Team Lead (Diogo Mónica)](https://www.se-radio.net/2017/05/se-radio-episode-290-diogo-monica-on-docker-security/) - [Ten Docker Image Security Best Practices Cheat Sheet](https://snyk.io/blog/10-docker-image-security-best-practices/) - [Top ten most popular docker images each contain at least 30 vulnerabilities](https://snyk.io/blog/top-ten-most-popular-docker-images-each-contain-at-least-30-vulnerabilities/) - [Tuning Docker with the newest security enhancements](https://opensource.com/business/15/3/docker-security-tuning) +- [10 best practices to containerize Node.js web applications with Docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/) ## Videos -- [Contributing to Docker by Andrew "Tianon" Page (InfoSiftr)](https://www.youtube.com/watch?v=1jwo8-1HYYg) (34:31) -- [Deploying and scaling applications with Docker, Swarm, and a tiny bit of Python magic](https://www.youtube.com/watch?v=GpHMTR7P2Ms) (3:11:06) by [@jpetazzo][jpetazzo] -- [Docker and SELinux by Daniel Walsh from Red Hat](https://www.youtube.com/watch?v=zWGFqMuEHdw) (40:23) -- [Docker Course](https://www.youtube.com/watch?v=UZpyvK6UGFo) (Spanish) by [@pablokbs](https://github.com/pablokbs) -- [Docker for Developers](https://www.youtube.com/watch?v=FdkNAjjO5yQ) (54:26) by [@jpetazzo][jpetazzo] <== Good introduction, context, demo -- [Docker from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxD-btrjrqdEfQHbkZnQrmqE) (1:22:01) on YouTube by Paris Nakita Kejser +- [Deploying and scaling applications with Docker, Swarm, and a tiny bit of Python magic](https://www.youtube.com/watch?v=GpHMTR7P2Ms) (3:11:06) +- [Docker Course](https://www.youtube.com/watch?v=UZpyvK6UGFo) (Spanish) +- [Docker for Developers](https://www.youtube.com/watch?v=FdkNAjjO5yQ) (54:26) +- [Docker from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxD-btrjrqdEfQHbkZnQrmqE) (1:22:01) - [Docker: How to Use Your Own Private Registry](https://www.youtube.com/watch?v=CAewZCBT4PI) (15:01) -- [Docker in Production](https://www.youtube.com/watch?v=Glk5d5WP6MI) by [@jpetazzo][jpetazzo] (36:05) -- [Docker Primer to Docker Compose](https://www.youtube.com/watch?v=G-s2GXGAjTk) (1:56:45) on YouTube by LoginRadius -- [Docker Registry from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxAz3d4Fj3edq7UcxEhdTCBm) (44:40) on YouTube by Paris Nakita Kejser -- [Docker Swarm from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxAY4gZd1Wl-GsLvg-e9Ap1e) (1:41:28) on YouTube by Paris Nakita Kejser +- [Docker in Production](https://www.youtube.com/watch?v=Glk5d5WP6MI) (36:05) +- [Docker Primer to Docker Compose](https://www.youtube.com/watch?v=G-s2GXGAjTk) (1:56:45) +- [Docker Registry from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxAz3d4Fj3edq7UcxEhdTCBm) (44:40) +- [Docker Swarm from scratch](https://www.youtube.com/playlist?list=PLLhEJK7fQIxAY4gZd1Wl-GsLvg-e9Ap1e) (1:41:28) - [Extending Docker with Plugins](https://vimeo.com/110835013) (15:21) -- [From Local Docker Development to Production Deployments](https://www.youtube.com/watch?v=7CZFpHUPqXw) by [@jpetazzo][jpetazzo] @ AWS re:Invent 2015 -- [Immutable Infrastructure with Docker and EC2 by Michael Bryzek (Gilt)](https://www.youtube.com/watch?v=GaHzdqFithc) (42:04) -- [Introduction to Docker and containers](https://www.youtube.com/watch?v=ZVaRK10HBjo) (3:09:00) by [@jpetazzo][jpetazzo] +- [From Local Docker Development to Production Deployments](https://www.youtube.com/watch?v=7CZFpHUPqXw) +- [Introduction to Docker and containers](https://www.youtube.com/watch?v=ZVaRK10HBjo) (3:09:00) - [Logging on Docker: What You Need to Know](https://vimeo.com/123341629) (51:27) - [Performance Analysis of Docker - Jeremy Eder](https://www.youtube.com/watch?v=6f2E6PKYb0w) (1:36:58) - [Scalable Microservices with Kubernetes](https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615) Free Udacity course - [State of containers: a debate with CoreOS, VMware and Google](https://www.youtube.com/watch?v=IiITP3yIRd8) (27:38) +## Communities and Meetups -# Communities and Meetups - -## Brazilian +### Brazilian -- [Docker BR on Slack](http://docker-br.herokuapp.com) - Auto invite url - [Docker BR on Telegram](https://telegram.me/dockerbr) -## Chinese +### English -- [DockerOne](http://dockone.io/) Docker Community (in Chinese) by [@LiYingJie](http://dockone.io/people/%E6%9D%8E%E9%A2%96%E6%9D%B0) - -## English - -- [Docker Community](https://www.docker.com/docker-community) -- [Docker Events](https://www.docker.com/events) -- [Docker On Line Meetup](https://www.meetup.com/Docker-Online-Meetup/) +- [Docker Community](https://www.docker.com/community/) +- [Docker Events](https://www.docker.com/events/) +- [Docker Online Meetup](https://www.meetup.com/en-AU/Docker-Online-Meetup/) - [Docker Reddit Community](https://www.reddit.com/r/docker/) -## Russian +### Russian - [Docker Russian-speaking Community](https://t.me/docker_ru) -## Spanish +### Spanish - [Docker Tips](https://dockertips.com/) - ## Stargazers over time -[![Stargazers over time](https://starchart.cc/veggiemonk/awesome-docker.svg)](https://starchart.cc/veggiemonk/awesome-docker) - -## Contributor over time +[![Stargazers over time](https://starchart.cc/veggiemonk/awesome-docker.svg?variant=adaptive)](https://starchart.cc/veggiemonk/awesome-docker) -[![Contributor over time](https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime&repo=veggiemonk/awesome-docker)](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=veggiemonk/awesome-docker) - - -[contributing]: https://github.com/veggiemonk/awesome-docker/blob/master/.github/CONTRIBUTING.md -[calico]: https://github.com/projectcalico/calicoctl -[centurylinklabs]: https://github.com/CenturyLinkLabs -[containx]: https://github.com/ContainX -[containers]: https://github.com/containers +[calico]: https://github.com/projectcalico/calico [coreos]: https://github.com/coreos -[cncf]: https://www.cncf.io -[crazy-max]: https://github.com/crazy-max -[deepfence]: https://github.com/deepfence [distribution]: https://github.com/docker/distribution -[docker-flow]: https://github.com/docker-flow -[docker-for-windows]: https://docs.docker.com/docker-for-windows/ -[docker]: https://github.com/docker +[docker-for-windows]: https://docs.docker.com/desktop/setup/install/windows-install/ [editreadme]: https://github.com/veggiemonk/awesome-docker/edit/master/README.md -[fgrehm]: https://github.com/fgrehm -[gesellix]: https://github.com/gesellix -[genuinetools]: https://github.com/genuinetools -[gliderlabs]: https://github.com/gliderlabs -[grammarly]: https://github.com/grammarly -[google]: https://github.com/google -[googlecontainertools]: https://github.com/GoogleContainerTools -[inspec]: https://github.com/inspec/inspec -[jessfraz]: https://github.com/jessfraz -[jpetazzo]: https://github.com/jpetazzo -[jwilder]: https://github.com/jwilder [kubernetes]: https://kubernetes.io -[nvidia]: https://github.com/nvidia [nginxproxy]: https://github.com/nginx-proxy/nginx-proxy -[openshift]: https://www.okd.io -[oracle]: https://github.com/oracle -[progrium]: https://github.com/progrium -[ramitsurana]: https://github.com/ramitsurana -[rancher]: https://github.com/rancher -[safe-waters]: https://github.com/safe-waters +[openshift]: https://okd.io/ [sindresorhus]: https://github.com/sindresorhus/awesome -[spotify]: https://github.com/spotify -[tomastomecek]: https://github.com/TomasTomecek -[vegasbrianc]: https://github.com/vegasbrianc -[weave]: https://github.com/weaveworks/weave -[VMWare]: https://github.com/vmware -[@byrnedo]: https://github.com/byrnedo -[@skanehira]: https://github.com/skanehira + diff --git a/build.js b/build.js deleted file mode 100644 index 898314ade..000000000 --- a/build.js +++ /dev/null @@ -1,51 +0,0 @@ -const fs = require('fs-extra'); -const cheerio = require('cheerio'); -const showdown = require('showdown'); - -process.env.NODE_ENV = 'production'; - -const LOG = { - error: (...args) => console.error('❌ ERROR', { ...args }), - debug: (...args) => { - if (process.env.DEBUG) console.log('💡 DEBUG: ', { ...args }); - }, -}; -const handleFailure = (err) => { - LOG.error(err); - process.exit(1); -}; - -process.on('unhandledRejection', handleFailure); - -// --- FILES -const README = 'README.md'; -const WEBSITE_FOLDER = 'website'; -const indexTemplate = `${WEBSITE_FOLDER}/index.tmpl.html`; -const indexDestination = `${WEBSITE_FOLDER}/index.html`; - -async function processIndex() { - const converter = new showdown.Converter(); - converter.setFlavor('github'); - - try { - LOG.debug('Loading files...', { indexTemplate, README }); - const template = await fs.readFile(indexTemplate, 'utf8'); - const markdown = await fs.readFile(README, 'utf8'); - - LOG.debug('Merging files...'); - const $ = cheerio.load(template); - $('#md').append(converter.makeHtml(markdown)); - - LOG.debug('Writing index.html'); - await fs.outputFile(indexDestination, $.html(), 'utf8'); - LOG.debug('DONE 👍'); - } catch (err) { - handleFailure(err); - } -} - -async function main() { - await processIndex(); -} - -main(); diff --git a/cmd/awesome-docker/main.go b/cmd/awesome-docker/main.go new file mode 100644 index 000000000..8440e87d8 --- /dev/null +++ b/cmd/awesome-docker/main.go @@ -0,0 +1,878 @@ +package main + +import ( + "context" + "errors" + "fmt" + "os" + "strconv" + "strings" + + "github.com/spf13/cobra" + "github.com/veggiemonk/awesome-docker/internal/builder" + "github.com/veggiemonk/awesome-docker/internal/cache" + "github.com/veggiemonk/awesome-docker/internal/checker" + "github.com/veggiemonk/awesome-docker/internal/linter" + "github.com/veggiemonk/awesome-docker/internal/parser" + "github.com/veggiemonk/awesome-docker/internal/pruner" + "github.com/veggiemonk/awesome-docker/internal/scorer" + "github.com/veggiemonk/awesome-docker/internal/tui" +) + +const ( + readmePath = "README.md" + excludePath = "config/exclude.yaml" + templatePath = "config/website.tmpl.html" + healthCachePath = "config/health_cache.yaml" + websiteOutput = "website/index.html" + version = "0.1.0" +) + +type checkSummary struct { + Broken []checker.LinkResult + Redirected []checker.LinkResult + GitHubErrors []error + ExternalTotal int + GitHubTotal int + GitHubSkipped bool +} + +func main() { + root := &cobra.Command{ + Use: "awesome-docker", + Short: "Quality tooling for the awesome-docker curated list", + } + + root.AddCommand( + versionCmd(), + lintCmd(), + fixOrderCmd(), + checkCmd(), + healthCmd(), + buildCmd(), + reportCmd(), + validateCmd(), + ciCmd(), + browseCmd(), + pruneCmd(), + ) + + if err := root.Execute(); err != nil { + os.Exit(1) + } +} + +func versionCmd() *cobra.Command { + return &cobra.Command{ + Use: "version", + Short: "Print version", + Run: func(cmd *cobra.Command, args []string) { fmt.Printf("awesome-docker v%s\n", version) }, + } +} + +func parseReadme() (parser.Document, error) { + f, err := os.Open(readmePath) + if err != nil { + return parser.Document{}, err + } + defer f.Close() + return parser.Parse(f) +} + +func collectURLs(sections []parser.Section, urls *[]string) { + for _, s := range sections { + for _, e := range s.Entries { + *urls = append(*urls, e.URL) + } + collectURLs(s.Children, urls) + } +} + +type entryMeta struct { + Category string + Description string +} + +func collectEntriesWithCategory(sections []parser.Section, parentPath string, out map[string]entryMeta) { + for _, s := range sections { + path := s.Title + if parentPath != "" { + path = parentPath + " > " + s.Title + } + for _, e := range s.Entries { + out[e.URL] = entryMeta{Category: path, Description: e.Description} + } + collectEntriesWithCategory(s.Children, path, out) + } +} + +func runLinkChecks(prMode bool) (checkSummary, error) { + doc, err := parseReadme() + if err != nil { + return checkSummary{}, fmt.Errorf("parse: %w", err) + } + + var urls []string + collectURLs(doc.Sections, &urls) + + exclude, err := cache.LoadExcludeList(excludePath) + if err != nil { + return checkSummary{}, fmt.Errorf("load exclude list: %w", err) + } + + ghURLs, extURLs := checker.PartitionLinks(urls) + + summary := checkSummary{ + ExternalTotal: len(extURLs), + GitHubTotal: len(ghURLs), + } + + results := checker.CheckLinks(extURLs, 10, exclude) + for _, r := range results { + if !r.OK { + summary.Broken = append(summary.Broken, r) + } + if r.Redirected { + summary.Redirected = append(summary.Redirected, r) + } + } + + if prMode { + summary.GitHubSkipped = true + return summary, nil + } + + token := os.Getenv("GITHUB_TOKEN") + if token == "" { + summary.GitHubSkipped = true + return summary, nil + } + + gc := checker.NewGitHubChecker(token) + _, errs := gc.CheckRepos(context.Background(), ghURLs, 50) + summary.GitHubErrors = errs + return summary, nil +} + +func runHealth(ctx context.Context) error { + token := os.Getenv("GITHUB_TOKEN") + if token == "" { + return errors.New("GITHUB_TOKEN environment variable is required") + } + + doc, err := parseReadme() + if err != nil { + return fmt.Errorf("parse: %w", err) + } + + var urls []string + collectURLs(doc.Sections, &urls) + ghURLs, _ := checker.PartitionLinks(urls) + + fmt.Printf("Scoring %d GitHub repositories...\n", len(ghURLs)) + gc := checker.NewGitHubChecker(token) + infos, errs := gc.CheckRepos(ctx, ghURLs, 50) + for _, e := range errs { + fmt.Printf(" error: %v\n", e) + } + if len(infos) == 0 { + if len(errs) > 0 { + return fmt.Errorf( + "failed to fetch GitHub metadata for all repositories (%d errors); check network/DNS and GITHUB_TOKEN", + len(errs), + ) + } + return errors.New("no GitHub repositories found in README") + } + + scored := scorer.ScoreAll(infos) + + meta := make(map[string]entryMeta) + collectEntriesWithCategory(doc.Sections, "", meta) + for i := range scored { + if m, ok := meta[scored[i].URL]; ok { + scored[i].Category = m.Category + scored[i].Description = m.Description + } + } + + cacheEntries := scorer.ToCacheEntries(scored) + + hc, err := cache.LoadHealthCache(healthCachePath) + if err != nil { + return fmt.Errorf("load cache: %w", err) + } + hc.Merge(cacheEntries) + if err := cache.SaveHealthCache(healthCachePath, hc); err != nil { + return fmt.Errorf("save cache: %w", err) + } + + fmt.Printf("Cache updated: %d entries in %s\n", len(hc.Entries), healthCachePath) + return nil +} + +func scoredFromCache() ([]scorer.ScoredEntry, error) { + hc, err := cache.LoadHealthCache(healthCachePath) + if err != nil { + return nil, fmt.Errorf("load cache: %w", err) + } + if len(hc.Entries) == 0 { + return nil, errors.New("no cache data, run 'health' first") + } + + scored := make([]scorer.ScoredEntry, 0, len(hc.Entries)) + for i := range hc.Entries { + e := &hc.Entries[i] + scored = append(scored, scorer.ScoredEntry{ + URL: e.URL, + Name: e.Name, + Status: scorer.Status(e.Status), + Stars: e.Stars, + Forks: e.Forks, + HasLicense: e.HasLicense, + LastPush: e.LastPush, + Category: e.Category, + Description: e.Description, + }) + } + return scored, nil +} + +func markdownReportFromCache() (string, error) { + scored, err := scoredFromCache() + if err != nil { + return "", err + } + return scorer.GenerateReport(scored), nil +} + +func writeGitHubOutput(path, key, value string) error { + if path == "" { + return nil + } + f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) + if err != nil { + return fmt.Errorf("open github output file: %w", err) + } + defer f.Close() + if _, err := fmt.Fprintf(f, "%s=%s\n", key, value); err != nil { + return fmt.Errorf("write github output: %w", err) + } + return nil +} + +func sanitizeOutputValue(v string) string { + v = strings.ReplaceAll(v, "\n", " ") + v = strings.ReplaceAll(v, "\r", " ") + return strings.TrimSpace(v) +} + +func buildBrokenLinksIssueBody(summary checkSummary, runErr error) string { + var b strings.Builder + b.WriteString("# Broken Links Detected\n\n") + + if runErr != nil { + b.WriteString("The link checker failed to execute cleanly.\n\n") + b.WriteString("## Failure\n\n") + fmt.Fprintf(&b, "- %s\n\n", runErr) + } else { + fmt.Fprintf(&b, "- Broken links: %d\n", len(summary.Broken)) + fmt.Fprintf(&b, "- Redirected links: %d\n", len(summary.Redirected)) + fmt.Fprintf(&b, "- GitHub API errors: %d\n\n", len(summary.GitHubErrors)) + + if len(summary.Broken) > 0 { + b.WriteString("## Broken Links\n\n") + for _, r := range summary.Broken { + fmt.Fprintf(&b, "- `%s` -> `%d %s`\n", r.URL, r.StatusCode, strings.TrimSpace(r.Error)) + } + b.WriteString("\n") + } + + if len(summary.GitHubErrors) > 0 { + b.WriteString("## GitHub API Errors\n\n") + for _, e := range summary.GitHubErrors { + fmt.Fprintf(&b, "- `%s`\n", e) + } + b.WriteString("\n") + } + } + + b.WriteString("## Action Required\n\n") + b.WriteString("- Update the URL if the resource moved\n") + b.WriteString("- Remove the entry if permanently unavailable\n") + b.WriteString("- Add to `config/exclude.yaml` if a known false positive\n") + b.WriteString("- Investigate GitHub API/auth failures when present\n\n") + b.WriteString("---\n") + b.WriteString("*Auto-generated by awesome-docker ci broken-links*\n") + return b.String() +} + +func buildHealthReportIssueBody(report string, healthErr error) string { + var b strings.Builder + if healthErr != nil { + b.WriteString("WARNING: health refresh failed in this run; showing latest cached report.\n\n") + fmt.Fprintf(&b, "Error: `%s`\n\n", healthErr) + } + b.WriteString(report) + if !strings.HasSuffix(report, "\n") { + b.WriteString("\n") + } + b.WriteString("\n---\n") + b.WriteString("*Auto-generated weekly by awesome-docker ci health-report*\n") + return b.String() +} + +func fixOrderCmd() *cobra.Command { + return &cobra.Command{ + Use: "fix-order", + Short: "Sort README entries alphabetically within each section", + RunE: func(cmd *cobra.Command, args []string) error { + count, err := linter.SortFile(readmePath) + if err != nil { + return fmt.Errorf("fix-order: %w", err) + } + if count == 0 { + fmt.Println("Already sorted, no changes needed") + } else { + fmt.Printf("Sorted %d lines in %s\n", count, readmePath) + } + return nil + }, + } +} + +func lintCmd() *cobra.Command { + var fix bool + cmd := &cobra.Command{ + Use: "lint", + Short: "Validate README formatting", + RunE: func(cmd *cobra.Command, args []string) error { + doc, err := parseReadme() + if err != nil { + return fmt.Errorf("parse: %w", err) + } + + result := linter.Lint(doc) + for _, issue := range result.Issues { + fmt.Println(issue) + } + + if result.Errors > 0 { + fmt.Printf("\n%d errors, %d warnings\n", result.Errors, result.Warnings) + if !fix { + return fmt.Errorf("lint failed with %d errors", result.Errors) + } + count, err := linter.FixFile(readmePath) + if err != nil { + return fmt.Errorf("fix: %w", err) + } + fmt.Printf("Fixed %d lines in %s\n", count, readmePath) + } else { + fmt.Printf("OK: %d warnings\n", result.Warnings) + } + + return nil + }, + } + cmd.Flags().BoolVar(&fix, "fix", false, "Auto-fix formatting issues") + return cmd +} + +func checkCmd() *cobra.Command { + var prMode bool + cmd := &cobra.Command{ + Use: "check", + Short: "Check links for reachability", + RunE: func(cmd *cobra.Command, args []string) error { + summary, err := runLinkChecks(prMode) + if err != nil { + return err + } + + fmt.Printf("Checking %d external links...\n", summary.ExternalTotal) + if !prMode { + if summary.GitHubSkipped { + fmt.Println("GITHUB_TOKEN not set, skipping GitHub repo checks") + } else { + fmt.Printf("Checking %d GitHub repositories...\n", summary.GitHubTotal) + } + } + + for _, e := range summary.GitHubErrors { + fmt.Printf(" GitHub error: %v\n", e) + } + + if len(summary.Redirected) > 0 { + fmt.Printf("\n%d redirected links (consider updating):\n", len(summary.Redirected)) + for _, r := range summary.Redirected { + fmt.Printf(" %s -> %s\n", r.URL, r.RedirectURL) + } + } + + if len(summary.Broken) > 0 { + fmt.Printf("\n%d broken links:\n", len(summary.Broken)) + for _, r := range summary.Broken { + fmt.Printf(" %s -> %d %s\n", r.URL, r.StatusCode, r.Error) + } + } + if len(summary.Broken) > 0 && len(summary.GitHubErrors) > 0 { + return fmt.Errorf( + "found %d broken links and %d GitHub API errors", + len(summary.Broken), + len(summary.GitHubErrors), + ) + } + if len(summary.Broken) > 0 { + return fmt.Errorf("found %d broken links", len(summary.Broken)) + } + if len(summary.GitHubErrors) > 0 { + return fmt.Errorf("github checks failed with %d errors", len(summary.GitHubErrors)) + } + + fmt.Println("All links OK") + return nil + }, + } + cmd.Flags().BoolVar(&prMode, "pr", false, "PR mode: skip GitHub API checks") + return cmd +} + +func healthCmd() *cobra.Command { + return &cobra.Command{ + Use: "health", + Short: "Score repository health and update cache", + RunE: func(cmd *cobra.Command, args []string) error { + return runHealth(context.Background()) + }, + } +} + +func buildCmd() *cobra.Command { + return &cobra.Command{ + Use: "build", + Short: "Generate website from README", + RunE: func(cmd *cobra.Command, args []string) error { + if err := builder.Build(readmePath, templatePath, websiteOutput); err != nil { + return err + } + fmt.Printf("Website built: %s\n", websiteOutput) + return nil + }, + } +} + +func reportCmd() *cobra.Command { + var jsonOutput bool + cmd := &cobra.Command{ + Use: "report", + Short: "Generate health report from cache", + RunE: func(cmd *cobra.Command, args []string) error { + scored, err := scoredFromCache() + if err != nil { + return err + } + + if jsonOutput { + payload, err := scorer.GenerateJSONReport(scored) + if err != nil { + return fmt.Errorf("json report: %w", err) + } + fmt.Println(string(payload)) + return nil + } + + report := scorer.GenerateReport(scored) + fmt.Print(report) + return nil + }, + } + + cmd.Flags().BoolVar(&jsonOutput, "json", false, "Output full health report as JSON") + return cmd +} + +func validateCmd() *cobra.Command { + return &cobra.Command{ + Use: "validate", + Short: "PR validation: lint + check --pr", + RunE: func(cmd *cobra.Command, args []string) error { + fmt.Println("=== Linting ===") + doc, err := parseReadme() + if err != nil { + return fmt.Errorf("parse: %w", err) + } + + result := linter.Lint(doc) + for _, issue := range result.Issues { + fmt.Println(issue) + } + if result.Errors > 0 { + fmt.Printf("\n%d errors, %d warnings\n", result.Errors, result.Warnings) + return fmt.Errorf("lint failed with %d errors", result.Errors) + } + fmt.Printf("Lint OK: %d warnings\n", result.Warnings) + + fmt.Println("\n=== Checking links (PR mode) ===") + summary, err := runLinkChecks(true) + if err != nil { + return err + } + fmt.Printf("Checking %d external links...\n", summary.ExternalTotal) + if len(summary.Broken) > 0 { + fmt.Printf("\n%d broken links:\n", len(summary.Broken)) + for _, r := range summary.Broken { + fmt.Printf(" %s -> %d %s\n", r.URL, r.StatusCode, r.Error) + } + return fmt.Errorf("found %d broken links", len(summary.Broken)) + } + + fmt.Println("\nValidation passed") + return nil + }, + } +} + +func ciCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "ci", + Short: "CI-oriented helper commands", + } + cmd.AddCommand( + ciBrokenLinksCmd(), + ciHealthReportCmd(), + ) + return cmd +} + +func ciBrokenLinksCmd() *cobra.Command { + var issueFile string + var githubOutput string + var strict bool + + cmd := &cobra.Command{ + Use: "broken-links", + Short: "Run link checks and emit CI outputs/artifacts", + RunE: func(cmd *cobra.Command, args []string) error { + summary, runErr := runLinkChecks(false) + + hasErrors := runErr != nil || len(summary.Broken) > 0 || len(summary.GitHubErrors) > 0 + exitCode := 0 + if hasErrors { + exitCode = 1 + } + if runErr != nil { + exitCode = 2 + } + + if issueFile != "" && hasErrors { + body := buildBrokenLinksIssueBody(summary, runErr) + if err := os.WriteFile(issueFile, []byte(body), 0o644); err != nil { + return fmt.Errorf("write issue file: %w", err) + } + } + + if err := writeGitHubOutput( + githubOutput, + "has_errors", + strconv.FormatBool(hasErrors), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "check_exit_code", + strconv.Itoa(exitCode), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "broken_count", + strconv.Itoa(len(summary.Broken)), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "github_error_count", + strconv.Itoa(len(summary.GitHubErrors)), + ); err != nil { + return err + } + if runErr != nil { + if err := writeGitHubOutput( + githubOutput, + "run_error", + sanitizeOutputValue(runErr.Error()), + ); err != nil { + return err + } + } + + if runErr != nil { + fmt.Printf("CI broken-links run error: %v\n", runErr) + } + if hasErrors { + fmt.Printf( + "CI broken-links found %d broken links and %d GitHub errors\n", + len(summary.Broken), + len(summary.GitHubErrors), + ) + } else { + fmt.Println("CI broken-links found no errors") + } + + if strict { + if runErr != nil { + return runErr + } + if hasErrors { + return fmt.Errorf( + "found %d broken links and %d GitHub API errors", + len(summary.Broken), + len(summary.GitHubErrors), + ) + } + } + return nil + }, + } + + cmd.Flags().StringVar(&issueFile, "issue-file", "broken_links_issue.md", "Path to write issue markdown body") + cmd.Flags(). + StringVar(&githubOutput, "github-output", "", "Path to GitHub output file (typically $GITHUB_OUTPUT)") + cmd.Flags().BoolVar(&strict, "strict", false, "Return non-zero when errors are found") + return cmd +} + +func ciHealthReportCmd() *cobra.Command { + var issueFile string + var githubOutput string + var strict bool + + cmd := &cobra.Command{ + Use: "health-report", + Short: "Refresh health cache, render report, and emit CI outputs/artifacts", + RunE: func(cmd *cobra.Command, args []string) error { + healthErr := runHealth(context.Background()) + report, reportErr := markdownReportFromCache() + + healthOK := healthErr == nil + reportOK := reportErr == nil + hasReport := reportOK && strings.TrimSpace(report) != "" + hasErrors := !healthOK || !reportOK + + if hasReport && issueFile != "" { + body := buildHealthReportIssueBody(report, healthErr) + if err := os.WriteFile(issueFile, []byte(body), 0o644); err != nil { + return fmt.Errorf("write issue file: %w", err) + } + } + + if err := writeGitHubOutput( + githubOutput, + "has_report", + strconv.FormatBool(hasReport), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "health_ok", + strconv.FormatBool(healthOK), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "report_ok", + strconv.FormatBool(reportOK), + ); err != nil { + return err + } + if err := writeGitHubOutput( + githubOutput, + "has_errors", + strconv.FormatBool(hasErrors), + ); err != nil { + return err + } + if healthErr != nil { + if err := writeGitHubOutput( + githubOutput, + "health_error", + sanitizeOutputValue(healthErr.Error()), + ); err != nil { + return err + } + } + if reportErr != nil { + if err := writeGitHubOutput( + githubOutput, + "report_error", + sanitizeOutputValue(reportErr.Error()), + ); err != nil { + return err + } + } + + if healthErr != nil { + fmt.Printf("CI health-report health error: %v\n", healthErr) + } + if reportErr != nil { + fmt.Printf("CI health-report report error: %v\n", reportErr) + } + if hasReport { + fmt.Println("CI health-report generated report artifact") + } else { + fmt.Println("CI health-report has no report artifact") + } + + if strict { + if healthErr != nil { + return healthErr + } + if reportErr != nil { + return reportErr + } + } + return nil + }, + } + + cmd.Flags().StringVar(&issueFile, "issue-file", "health_report.txt", "Path to write health issue markdown body") + cmd.Flags(). + StringVar(&githubOutput, "github-output", "", "Path to GitHub output file (typically $GITHUB_OUTPUT)") + cmd.Flags().BoolVar(&strict, "strict", false, "Return non-zero when health/report fails") + return cmd +} + +func browseCmd() *cobra.Command { + var cachePath string + cmd := &cobra.Command{ + Use: "browse", + Short: "Interactive TUI browser for awesome-docker resources", + RunE: func(cmd *cobra.Command, args []string) error { + hc, err := cache.LoadHealthCache(cachePath) + if err != nil { + return fmt.Errorf("load cache: %w", err) + } + if len(hc.Entries) == 0 { + return errors.New("no cache data; run 'awesome-docker health' first") + } + return tui.Run(hc.Entries) + }, + } + cmd.Flags().StringVar(&cachePath, "cache", healthCachePath, "Path to health cache YAML") + return cmd +} + +func pruneCmd() *cobra.Command { + var ( + statuses []string + dryRun bool + keepCache bool + fromReport string + ) + cmd := &cobra.Command{ + Use: "prune", + Short: "Remove README entries by health status (default: archived, stale)", + Long: `Remove entries from README.md whose repository health status matches the +given list (default: "archived,stale"). The matching cache entries are also +dropped so the next health refresh starts from a clean slate. + +By default the target URL list is read from the local health cache. Refresh +it first with: + + awesome-docker health + +If the local cache is outdated (e.g. you only have the markdown report from +a CI-generated issue), point --from-report at the saved markdown report file +and the URLs will be parsed from its section headings instead. + +Use --dry-run to preview what would be removed without writing files.`, + RunE: func(cmd *cobra.Command, args []string) error { + var ( + targets map[string]cache.HealthEntry + hc *cache.HealthCache + ) + + if fromReport != "" { + f, err := os.Open(fromReport) //nolint:gosec + if err != nil { + return fmt.Errorf("open report: %w", err) + } + defer f.Close() + targets, err = pruner.TargetsFromReport(f, statuses) + if err != nil { + return fmt.Errorf("parse report: %w", err) + } + } else { + var err error + hc, err = cache.LoadHealthCache(healthCachePath) + if err != nil { + return fmt.Errorf("load cache: %w", err) + } + if len(hc.Entries) == 0 { + return errors.New("no cache data; run 'awesome-docker health' first") + } + targets = pruner.TargetURLs(hc, statuses) + } + + if len(targets) == 0 { + fmt.Printf("No entries match statuses %v; nothing to do\n", statuses) + return nil + } + + res, err := pruner.PruneREADME(readmePath, targets, dryRun) + if err != nil { + return fmt.Errorf("prune readme: %w", err) + } + + byStatus := map[string]int{} + for _, r := range res.Removed { + byStatus[r.Status]++ + } + action := "Removed" + if dryRun { + action = "Would remove" + } + fmt.Printf("%s %d entries from %s\n", action, len(res.Removed), readmePath) + for s, n := range byStatus { + fmt.Printf(" %s: %d\n", s, n) + } + for _, r := range res.Removed { + fmt.Printf(" - [%s] %s (%s)\n", r.Status, r.Name, r.URL) + } + if len(res.NotFound) > 0 { + fmt.Printf( + "\n%d target URLs not found in README (already pruned or URL drift):\n", + len(res.NotFound), + ) + for _, u := range res.NotFound { + fmt.Printf(" %s\n", u) + } + } + + if !keepCache && hc != nil { + dropped, err := pruner.PruneCache(healthCachePath, hc, targets, dryRun) + if err != nil { + return fmt.Errorf("prune cache: %w", err) + } + cacheAction := "Removed" + if dryRun { + cacheAction = "Would remove" + } + fmt.Printf("\n%s %d cache entries from %s\n", cacheAction, dropped, healthCachePath) + } + return nil + }, + } + cmd.Flags(). + StringSliceVar(&statuses, "status", []string{"archived", "stale"}, "Comma-separated health statuses to prune (archived,stale,inactive,dead)") + cmd.Flags().BoolVar(&dryRun, "dry-run", false, "Print what would be removed without writing files") + cmd.Flags().BoolVar(&keepCache, "keep-cache", false, "Do not remove pruned URLs from the health cache") + cmd.Flags(). + StringVar(&fromReport, "from-report", "", "Read target URLs from a markdown health report file instead of the cache") + return cmd +} diff --git a/config/exclude.yaml b/config/exclude.yaml new file mode 100644 index 000000000..a8cbdb935 --- /dev/null +++ b/config/exclude.yaml @@ -0,0 +1,19 @@ +# URLs or URL prefixes to skip during link checking. +# These are known false positives or rate-limited domains. +domains: + - https://vimeo.com + - https://travis-ci.org/veggiemonk/awesome-docker.svg + - https://github.com/apps/ + - https://twitter.com + - https://www.meetup.com/ + - https://cycle.io/ + - https://www.manning.com/ + - https://deepfence.io + - https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg + - https://www.se-radio.net/2017/05/se-radio-episode-290-diogo-monica-on-docker-security + - https://www.reddit.com/r/docker/ + - https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 + - https://www.youtube.com/playlist + - https://www.aquasec.com + - https://cloudsmith.com + - https://pythonspeed.com/ diff --git a/config/health_cache.yaml b/config/health_cache.yaml new file mode 100644 index 000000000..c103add9e --- /dev/null +++ b/config/health_cache.yaml @@ -0,0 +1,2087 @@ +entries: + - url: https://github.com/docker/compose + name: docker/compose + status: healthy + stars: 37391 + forks: 5810 + last_push: 2026-05-18T15:28:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/abiosoft/colima + name: abiosoft/colima + status: healthy + stars: 28876 + forks: 577 + last_push: 2026-05-18T19:53:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Container runtimes on macOS (and Linux) with minimal setup. + - url: https://github.com/containerd/containerd + name: containerd/containerd + status: healthy + stars: 20722 + forks: 3921 + last_push: 2026-05-18T20:51:55Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: An open and reliable container runtime. + - url: https://github.com/cri-o/cri-o + name: cri-o/cri-o + status: healthy + stars: 5613 + forks: 1173 + last_push: 2026-05-18T15:14:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Open Container Initiative-based implementation of Kubernetes Container Runtime Interface. + - url: https://github.com/google/gvisor + name: google/gvisor + status: healthy + stars: 18339 + forks: 1605 + last_push: 2026-05-18T21:19:08Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Application Kernel for Containers. + - url: https://github.com/lxc/lxc + name: lxc/lxc + status: healthy + stars: 5182 + forks: 1171 + last_push: 2026-05-18T15:46:42Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: LXC - Linux Containers. + - url: https://github.com/us/mocker + name: us/mocker + status: healthy + stars: 179 + forks: 4 + last_push: 2026-05-06T00:07:20Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Docker-compatible container CLI for macOS, built on Apple's Containerization framework. + - url: https://github.com/containers/libpod + name: containers/libpod + status: healthy + stars: 31722 + forks: 3113 + last_push: 2026-05-18T17:26:19Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Libpod is a library used to create container pods. Home of Podman. + - url: https://github.com/opencontainers/runc + name: opencontainers/runc + status: healthy + stars: 13233 + forks: 2281 + last_push: 2026-05-18T18:13:16Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: CLI tool for spawning and running containers according to the OCI specification. + - url: https://github.com/opencontainers/runtime-tools + name: opencontainers/runtime-tools + status: healthy + stars: 482 + forks: 165 + last_push: 2026-03-16T12:58:33Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Oci-runtime-tool is a collection of tools for working with the OCI runtime specification. + - url: https://github.com/youki-dev/youki + name: youki-dev/youki + status: healthy + stars: 7405 + forks: 432 + last_push: 2026-05-18T08:25:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Engine & Runtime + description: Container runtime written in Rust, implementing the OCI runtime specification. + - url: https://github.com/ansible-community/ansible-bender + name: ansible-community/ansible-bender + status: healthy + stars: 695 + forks: 73 + last_push: 2026-01-07T23:21:32Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: A tool utilising `ansible` and `buildah`. + - url: https://github.com/chainguard-dev/apko + name: chainguard-dev/apko + status: healthy + stars: 1612 + forks: 215 + last_push: 2026-05-18T00:57:59Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Declarative OCI image builder from apk packages; reproducible by design. + - url: https://github.com/containers/buildah + name: containers/buildah + status: healthy + stars: 8789 + forks: 896 + last_push: 2026-05-15T22:27:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: A tool that facilitates building OCI images. + - url: https://github.com/moby/buildkit + name: moby/buildkit + status: healthy + stars: 9971 + forks: 1417 + last_push: 2026-05-18T00:43:44Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit. + - url: https://github.com/docker/buildx + name: docker/buildx + status: healthy + stars: 4387 + forks: 638 + last_push: 2026-05-14T18:03:13Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Official Docker CLI plugin for multi-platform builds backed by BuildKit. + - url: https://github.com/cekit/cekit + name: cekit/cekit + status: healthy + stars: 113 + forks: 44 + last_push: 2026-03-30T04:08:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: A tool used by openshift to build base images using different build engines. + - url: https://github.com/orisano/dlayer + name: orisano/dlayer + status: healthy + stars: 446 + forks: 12 + last_push: 2026-05-12T12:49:02Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Docker layer analyzer. + - url: https://github.com/mudler/docker-companion + name: mudler/docker-companion + status: healthy + stars: 47 + forks: 9 + last_push: 2025-05-28T08:17:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: A command line tool written in Golang to squash and unpack docker images. + - url: https://github.com/orf/docker-repack + name: orf/docker-repack + status: inactive + stars: 154 + forks: 3 + last_push: 2025-04-24T06:46:00Z + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Repacks a Docker image into a smaller, more efficient version that makes it significantly faster to pull. + - url: https://github.com/earthly/earthly + name: earthly/earthly + status: healthy + stars: 12029 + forks: 454 + last_push: 2025-10-23T20:10:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Containerized build automation with Dockerfile-meets-Makefile syntax. + - url: https://github.com/utensils/essex + name: utensils/essex + status: inactive + stars: 38 + last_push: 2025-03-18T21:33:36Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: 'Boilerplate for Docker Based Projects: Essex is a CLI utility written in bash to quickly setup clean and consistent Docker projects with Makefile driven workflows.' + - url: https://github.com/NVIDIA/hpc-container-maker + name: NVIDIA/hpc-container-maker + status: healthy + stars: 514 + forks: 102 + last_push: 2026-05-11T21:40:05Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Generates Dockerfiles from a high level Python recipe, including building blocks for High-Performance Computing components. + - url: https://github.com/genuinetools/img + name: genuinetools/img + status: inactive + stars: 3986 + forks: 233 + last_push: 2024-05-19T22:07:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. + - url: https://github.com/ko-build/ko + name: ko-build/ko + status: healthy + stars: 8432 + forks: 442 + last_push: 2026-05-18T11:43:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Build and deploy Go applications as container images without a Dockerfile. + - url: https://github.com/nlewo/nix2container + name: nlewo/nix2container + status: healthy + stars: 842 + forks: 77 + last_push: 2026-04-06T15:03:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Build OCI images with Nix without `docker load` round-trips. + - url: https://github.com/cybersecsi/RAUDI + name: cybersecsi/RAUDI + status: healthy + stars: 560 + forks: 34 + last_push: 2026-05-18T03:59:35Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: A tool to automatically update (and optionally push to Docker Hub) Docker Images for 3rd party software whenever theres is a new release/update/commit. + - url: https://github.com/lavie/runlike + name: lavie/runlike + status: healthy + stars: 2926 + forks: 167 + last_push: 2026-04-27T14:03:20Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Generate `docker run`command and options from running containers. + - url: https://github.com/P3GLEG/Whaler + name: P3GLEG/Whaler + status: healthy + stars: 1185 + forks: 103 + last_push: 2026-04-08T19:28:12Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Builder + description: Program to reverse Docker images into Dockerfiles. + - url: https://github.com/chainguard-images/images + name: chainguard-images/images + status: healthy + stars: 668 + forks: 175 + last_push: 2026-05-18T20:50:10Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Base Images + description: Minimal, signed, SBOM-attested container images built on Wolfi. + - url: https://github.com/GoogleContainerTools/distroless + name: GoogleContainerTools/distroless + status: healthy + stars: 22631 + forks: 1389 + last_push: 2026-05-18T20:57:36Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Base Images + description: Language focused docker images, minus the operating system. + - url: https://github.com/chainguard-dev/melange + name: chainguard-dev/melange + status: healthy + stars: 598 + forks: 170 + last_push: 2026-05-18T00:48:12Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Base Images + description: Build apk packages from declarative YAML for use with apko. + - url: https://github.com/wolfi-dev/os + name: wolfi-dev/os + status: healthy + stars: 1217 + forks: 433 + last_push: 2026-05-18T15:10:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Base Images + description: Undistro Linux designed for containers; glibc-based, signed, daily SBOMs. + - url: https://github.com/Dockershelf/dockershelf + name: Dockershelf/dockershelf + status: healthy + stars: 96 + forks: 13 + last_push: 2026-04-30T01:03:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Dockerfile + description: A repository that serves as a collector for docker recipes that are universal, efficient and slim. Images are updated, tested and published daily via a Travis cron job. + - url: https://github.com/deckrun/dockadvisor + name: deckrun/dockadvisor + status: healthy + stars: 203 + forks: 7 + last_push: 2026-01-12T09:26:02Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Linter + description: Lightweight Dockerfile linter with 60+ rules, quality scoring, and security checks. + - url: https://github.com/wemake-services/docker-image-size-limit + name: wemake-services/docker-image-size-limit + status: healthy + stars: 131 + forks: 5 + last_push: 2026-05-15T07:17:04Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Linter + description: A tool to keep an eye on your docker images size. + - url: https://github.com/hadolint/hadolint + name: hadolint/hadolint + status: healthy + stars: 12141 + forks: 492 + last_push: 2026-05-13T10:19:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Building Images > Linter + description: A Dockerfile linter that checks for best practices, common mistakes, and is also able to lint any bash written in `RUN` instructions;. + - url: https://github.com/dragonflyoss/Dragonfly2 + name: dragonflyoss/Dragonfly2 + status: healthy + stars: 3167 + forks: 397 + last_push: 2026-05-15T03:49:27Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: Provide efficient, stable and secure file distribution and image acceleration based on p2p technology. + - url: https://github.com/imjasonh/kontain.me + name: imjasonh/kontain.me + status: healthy + stars: 240 + forks: 13 + last_push: 2026-05-15T14:30:38Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: On-demand container image registry that builds and serves images when they are pulled. + - url: https://github.com/uber/kraken + name: uber/kraken + status: healthy + stars: 6690 + forks: 473 + last_push: 2026-05-18T10:12:54Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: Uber's Highly scalable P2P docker registry, capable of distributing TBs of data in seconds. + - url: https://github.com/getnora-io/nora + name: getnora-io/nora + status: healthy + stars: 167 + forks: 11 + last_push: 2026-05-18T20:23:30Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: Lightweight multi-protocol artifact registry supporting Docker, Maven, npm, Cargo and PyPI in a single 32MB binary. Pull-through cache, Web UI, Prometheus metrics, RBAC auth. + - url: https://github.com/jhstatewide/nscr + name: jhstatewide/nscr + status: healthy + stars: 1 + last_push: 2025-10-27T14:37:18Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: A light-weight, self-contained container registry that's easy to run and maintain. + - url: https://github.com/inmagik/registryo + name: inmagik/registryo + status: healthy + stars: 15 + last_push: 2025-12-17T10:20:47Z + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry + description: UI and token based authentication server for onpremise docker registry. + - url: https://github.com/google/go-containerregistry + name: google/go-containerregistry + status: healthy + stars: 3872 + forks: 641 + last_push: 2026-05-18T19:37:36Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry CLI + description: Go library and CLI tools (`crane`, `gcrane`, `registry`) for working with container registries. + - url: https://github.com/oras-project/oras + name: oras-project/oras + status: healthy + stars: 2269 + forks: 234 + last_push: 2026-05-18T13:49:56Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry CLI + description: Push and pull arbitrary OCI artifacts to and from any OCI registry. + - url: https://github.com/regclient/regclient + name: regclient/regclient + status: healthy + stars: 1838 + forks: 122 + last_push: 2026-05-13T19:07:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry CLI + description: Daemonless registry client; copy, inspect, modify, and sign OCI images. + - url: https://github.com/containers/skopeo + name: containers/skopeo + status: healthy + stars: 10877 + forks: 921 + last_push: 2026-05-18T14:17:31Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Registry CLI + description: 'Work with remote image registries: retrieve information, copy images, sign content.' + - url: https://github.com/SongStitch/anchor + name: SongStitch/anchor + status: inactive + stars: 24 + last_push: 2025-01-15T23:09:06Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/quay/clair + name: quay/clair + status: healthy + stars: 10979 + forks: 1208 + last_push: 2026-05-13T17:02:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: Clair is an open source project for the static analysis of vulnerabilities in appc and docker containers. + - url: https://github.com/docker/scout-cli + name: docker/scout-cli + status: healthy + stars: 445 + forks: 128 + last_push: 2026-04-08T08:04:21Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: Official Docker CLI for SBOM generation, vulnerability analysis, and policy evaluation. + - url: https://github.com/anchore/grype + name: anchore/grype + status: healthy + stars: 12228 + forks: 795 + last_push: 2026-05-18T19:20:53Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: A vulnerability scanner for container images, filesystems and SBOMs. + - url: https://github.com/OpenSCAP/openscap + name: OpenSCAP/openscap + status: healthy + stars: 1717 + forks: 433 + last_push: 2026-05-14T13:22:33Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: OpenSCAP provides oscap-docker tool which is used to scan Docker containers and images. + - url: https://github.com/deadnews/pindock + name: deadnews/pindock + status: healthy + stars: 2 + last_push: 2026-05-07T11:07:59Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: Pin and update Docker image digests in Dockerfiles and compose files. + - url: https://github.com/anchore/syft + name: anchore/syft + status: healthy + stars: 8952 + forks: 860 + last_push: 2026-05-18T19:01:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: CLI tool and library for generating a Software Bill of Materials (SBOM) from container images and filesystems. + - url: https://github.com/aquasecurity/trivy + name: aquasecurity/trivy + status: healthy + stars: 35038 + forks: 379 + last_push: 2026-05-18T13:26:17Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Image Scanning & SBOM + description: Aqua Security's open source simple and comprehensive vulnerability scanner for containers (suitable for CI). + - url: https://github.com/sigstore/cosign + name: sigstore/cosign + status: healthy + stars: 5925 + forks: 734 + last_push: 2026-05-18T18:53:10Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Supply Chain + description: Container signing, verification, and transparency log for OCI artifacts. + - url: https://github.com/in-toto/in-toto + name: in-toto/in-toto + status: healthy + stars: 999 + forks: 155 + last_push: 2026-05-05T00:53:21Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Supply Chain + description: Framework for supply chain attestations; underpins SLSA and cosign provenance. + - url: https://github.com/sigstore/policy-controller + name: sigstore/policy-controller + status: healthy + stars: 172 + forks: 69 + last_push: 2026-05-08T23:10:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Supply Chain + description: Kubernetes admission controller enforcing cosign signatures on container images. + - url: https://github.com/in-toto/witness + name: in-toto/witness + status: healthy + stars: 530 + forks: 77 + last_push: 2026-05-18T19:19:00Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Image Lifecycle > Supply Chain + description: Generate and verify in-toto attestations across the build pipeline. + - url: https://github.com/magicmark/composerize + name: magicmark/composerize + status: healthy + stars: 3738 + forks: 253 + last_push: 2026-05-17T14:35:15Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Composition + description: Convert docker run commands into docker-compose files. + - url: https://github.com/ctk-hq/ctk + name: ctk-hq/ctk + status: healthy + stars: 300 + forks: 27 + last_push: 2026-02-15T22:53:00Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Composition + description: Visual composer for container based workloads. + - url: https://github.com/kubernetes/kompose + name: kubernetes/kompose + status: healthy + stars: 10525 + forks: 798 + last_push: 2026-04-16T14:23:39Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Composition + description: Go from Docker Compose to Kubernetes. + - url: https://github.com/ihucos/plash + name: ihucos/plash + status: inactive + stars: 384 + forks: 15 + last_push: 2025-03-20T15:47:21Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Composition + description: A container run and build engine - runs inside docker. + - url: https://github.com/containers/podman-compose + name: containers/podman-compose + status: healthy + stars: 6074 + forks: 596 + last_push: 2026-05-04T20:34:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Composition + description: A script to run docker-compose.yml using podman. + - url: https://github.com/CloudSlang/cloud-slang + name: CloudSlang/cloud-slang + status: healthy + stars: 241 + forks: 84 + last_push: 2026-05-14T12:30:42Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: CloudSlang is a workflow engine to create Docker process automation. + - url: https://github.com/Wowu/docker-rollout + name: Wowu/docker-rollout + status: healthy + stars: 3213 + forks: 95 + last_push: 2026-04-02T21:01:55Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: Zero downtime deployment for Docker Compose services. + - url: https://github.com/kubernetes/kubernetes + name: kubernetes/kubernetes + status: healthy + stars: 122338 + forks: 43096 + last_push: 2026-05-18T16:14:02Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: Open source orchestration system for Docker containers by Google. + - url: https://github.com/apache/mesos + name: apache/mesos + status: healthy + stars: 5370 + forks: 1666 + last_push: 2026-05-15T22:22:50Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: Resource/Job scheduler for containers, VM's and physical hosts. + - url: https://github.com/hashicorp/nomad + name: hashicorp/nomad + status: healthy + stars: 16509 + forks: 2088 + last_push: 2026-05-18T19:55:35Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: Easily deploy applications at any scale. A Distributed, Highly Available, Datacenter-Aware Scheduler. + - url: https://github.com/rancher/rancher + name: rancher/rancher + status: healthy + stars: 25585 + forks: 3194 + last_push: 2026-05-18T21:09:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: An open source project that provides a complete platform for operating Docker in production. + - url: https://github.com/crazy-max/swarm-cronjob + name: crazy-max/swarm-cronjob + status: healthy + stars: 872 + forks: 74 + last_push: 2026-05-18T19:04:41Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Orchestration + description: Create jobs on a time-based schedule on Swarm. + - url: https://github.com/caprover/caprover + name: caprover/caprover + status: healthy + stars: 15028 + forks: 976 + last_push: 2026-05-14T18:12:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: '[Previously known as CaptainDuckDuck] Automated Scalable Webserver Package (automated Docker+nginx) - Heroku on Steroids.' + - url: https://github.com/convox/rack + name: convox/rack + status: healthy + stars: 1892 + forks: 176 + last_push: 2026-04-21T23:26:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Convox Rack is open source PaaS built on top of expert infrastructure automation and devops best practices. + - url: https://github.com/deploystackio/docker-to-iac + name: deploystackio/docker-to-iac + status: healthy + stars: 21 + last_push: 2026-03-20T05:57:15Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Translate docker run and commit into Infrastructure as Code templates for AWS, Render.com and DigitalOcean. + - url: https://github.com/dokku/dokku + name: dokku/dokku + status: healthy + stars: 31887 + forks: 2034 + last_push: 2026-05-17T06:58:54Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Docker powered mini-Heroku that helps you build and manage the lifecycle of applications. + - url: https://github.com/exoframejs/exoframe + name: exoframejs/exoframe + status: healthy + stars: 1151 + forks: 59 + last_push: 2026-05-11T20:05:06Z + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: A self-hosted tool that allows simple one-command deployments using Docker. + - url: https://github.com/grafeas/grafeas + name: grafeas/grafeas + status: healthy + stars: 1564 + forks: 307 + last_push: 2026-05-08T23:32:27Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: A common API for metadata about containers, from image and build details to security vulnerabilities. + - url: https://github.com/LombardiDaniel/swarm-ansible + name: LombardiDaniel/swarm-ansible + status: healthy + stars: 57 + forks: 4 + last_push: 2026-03-10T23:06:30Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/hansehe/SwarmManagement + name: hansehe/SwarmManagement + status: healthy + stars: 21 + forks: 1 + last_push: 2026-05-05T11:10:29Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Swarm Management is a python application, installed with pip. The application makes it easy to manage a Docker Swarm by configuring a single yaml file describing which stacks to deploy, and which networks, configs or secrets to create. + - url: https://github.com/tsuru/tsuru + name: tsuru/tsuru + status: healthy + stars: 5277 + forks: 553 + last_push: 2026-05-18T21:07:41Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Tsuru is an extensible and open source Platform as a Service software. + - url: https://github.com/werf/werf + name: werf/werf + status: healthy + stars: 4685 + forks: 236 + last_push: 2026-05-18T17:59:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Deployment & Platforms + description: Werf is a CI/CD tool for building Docker images efficiently and deploying them to Kubernetes using GitOps. + - url: https://github.com/Yelp/docker-custodian + name: Yelp/docker-custodian + status: healthy + stars: 373 + forks: 49 + last_push: 2026-04-02T17:05:49Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Garbage Collection + description: Keep docker hosts tidy. + - url: https://github.com/stepchowfun/docuum + name: stepchowfun/docuum + status: healthy + stars: 693 + forks: 42 + last_push: 2026-04-26T19:47:34Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Running Containers > Garbage Collection + description: Least recently used (LRU) eviction of Docker images. + - url: https://github.com/bytesharky/docker-dns + name: bytesharky/docker-dns + status: healthy + stars: 4 + forks: 1 + last_push: 2025-12-26T02:44:43Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Networking + description: Lightweight DNS forwarder for Docker containers, resolves container names with custom suffixes (e.g. `.docker`) on the host to simplify service discovery. + - url: https://github.com/coreos/flannel + name: coreos/flannel + status: healthy + stars: 9454 + forks: 2892 + last_push: 2026-05-18T14:49:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/nicolaka/netshoot + name: nicolaka/netshoot + status: healthy + stars: 10684 + forks: 1087 + last_push: 2026-04-16T16:42:57Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Networking + description: The netshoot container has a powerful set of networking tools to help troubleshoot Docker networking issues. + - url: https://github.com/jpetazzo/pipework + name: jpetazzo/pipework + status: inactive + stars: 4252 + forks: 725 + last_push: 2024-11-04T17:31:57Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Networking + description: Software-Defined Networking for Linux Containers, Pipework works with "plain" LXC containers, and with the awesome Docker. + - url: https://github.com/gliderlabs/registrator + name: gliderlabs/registrator + status: healthy + stars: 4675 + forks: 904 + last_push: 2025-05-22T04:16:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Networking + description: Service registry bridge for Docker. + - url: https://github.com/bunkerity/bunkerweb + name: bunkerity/bunkerweb + status: healthy + stars: 10501 + forks: 606 + last_push: 2026-05-18T20:54:11Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Open-source and next-gen Web Application Firewall (WAF). + - url: https://github.com/lucaslorentz/caddy-docker-proxy + name: lucaslorentz/caddy-docker-proxy + status: healthy + stars: 4476 + forks: 216 + last_push: 2026-05-12T03:10:39Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Caddy-based reverse proxy, configured with service or container labels. + - url: https://github.com/invzhi/caddy-docker-upstreams + name: invzhi/caddy-docker-upstreams + status: healthy + stars: 35 + forks: 8 + last_push: 2025-09-08T05:17:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Docker upstreams module for Caddy, configured with container labels. + - url: https://github.com/moonbuggy/docker-dnsmasq-updater + name: moonbuggy/docker-dnsmasq-updater + status: inactive + stars: 34 + forks: 2 + last_push: 2025-02-09T00:21:52Z + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Update a remote dnsmasq server with Docker container hostnames. + - url: https://github.com/docker-flow/docker-flow-proxy + name: docker-flow/docker-flow-proxy + status: healthy + stars: 318 + forks: 186 + last_push: 2025-12-05T02:29:16Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Reconfigures proxy every time a new service is deployed, or when a service is scaled. + - url: https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion + name: nginx-proxy/docker-letsencrypt-nginx-proxy-companion + status: healthy + stars: 7703 + forks: 831 + last_push: 2026-05-07T11:30:30Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: A lightweight companion container for the nginx-proxy. It allow the creation/renewal of Let's Encrypt certificates automatically. + - url: https://github.com/Yundera/mesh-router + name: Yundera/mesh-router + status: healthy + stars: 12 + forks: 1 + last_push: 2026-03-02T15:37:53Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Free domain(nsl.sh) provider for Docker containers with automatic HTTPS routing. Uses Wireguard VPN to securely route subdomain requests across networks. Ideal for self-hosted NAS and cloud deployments. + - url: https://github.com/jc21/nginx-proxy-manager + name: jc21/nginx-proxy-manager + status: healthy + stars: 32862 + forks: 3743 + last_push: 2026-05-18T06:55:45Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: A beautiful web interface for proxying web based services with SSL. + - url: https://github.com/Safe3/openresty-manager + name: Safe3/openresty-manager + status: healthy + stars: 1383 + forks: 106 + last_push: 2026-05-17T13:30:56Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: The easiest using, powerful and beautiful OpenResty Manager(Nginx Enhanced Version), open source alternative to OpenResty Edge. + - url: https://github.com/flavioaiello/swarm-router + name: flavioaiello/swarm-router + status: healthy + stars: 75 + forks: 12 + last_push: 2025-09-15T06:12:30Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: A zero config service name based router for docker swarm mode with a fresh and more secure approach. + - url: https://github.com/containous/traefik + name: containous/traefik + status: healthy + stars: 63213 + forks: 6001 + last_push: 2026-05-18T14:02:06Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Networking & Proxies > Reverse Proxy + description: Automated reverse proxy and load-balancer for Docker, Mesos, Consul, Etcd. + - url: https://github.com/resulgg/label-backup + name: resulgg/label-backup + status: healthy + stars: 22 + forks: 2 + last_push: 2025-10-27T12:29:36Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Storage & Data + description: A lightweight, Docker-aware backup agent that automatically discovers and backs up containerized databases (PostgreSQL, MySQL, MongoDB, Redis) based on Docker labels. Supports local storage and S3-compatible destinations with flexible scheduling via cron expressions. + - url: https://github.com/jaldertech/adrg + name: jaldertech/adrg + status: healthy + stars: 9 + last_push: 2026-03-07T21:00:08Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Dynamic Docker resource governor using cgroups v2 to manage system load. + - url: https://github.com/Appdynamics/docker-monitoring-extension + name: Appdynamics/docker-monitoring-extension + status: inactive + stars: 5 + forks: 6 + last_push: 2024-10-02T10:48:59Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Docker Monitoring extension gathers metrics from the Docker Remote API, either using Unix Socket or TCP. + - url: https://github.com/willfarrell/docker-autoheal + name: willfarrell/docker-autoheal + status: healthy + stars: 1904 + forks: 258 + last_push: 2025-09-09T16:33:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Monitor and restart unhealthy docker containers automatically. + - url: https://github.com/google/cadvisor + name: google/cadvisor + status: healthy + stars: 19132 + forks: 2465 + last_push: 2026-05-14T15:14:42Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Analyzes resource usage and performance characteristics of running containers. + - url: https://github.com/zorak1103/dlia + name: zorak1103/dlia + status: healthy + stars: 3 + last_push: 2026-05-12T05:41:14Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: DLIA is an AI-powered Docker log monitoring agent that uses Large Language Models (LLMs) to intelligently analyze container logs, detect anomalies, and provide contextual insights over time. + - url: https://github.com/dlepaux/docker-exporter + name: dlepaux/docker-exporter + status: healthy + stars: 1 + last_push: 2026-05-15T05:47:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Lightweight Prometheus exporter for Docker container metrics written in Rust. Correct cgroup v2 memory working set on ARM64 (Raspberry Pi 5), runs non-root with a read-only socket, ~7 MiB idle RAM. + - url: https://github.com/Will-Luck/Docker-Sentinel + name: Will-Luck/Docker-Sentinel + status: healthy + stars: 18 + forks: 2 + last_push: 2026-05-15T22:53:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Automated container updates with per-container policies, rollback safety, and a real-time web dashboard. + - url: https://github.com/deep-on/dockprobe + name: deep-on/dockprobe + status: healthy + stars: 14 + last_push: 2026-04-11T08:07:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Lightweight Docker monitoring dashboard in a single container. Real-time metrics, 6 anomaly detection rules, Telegram alerts, and 16 automated security scans. Zero config, ~50MB RAM. + - url: https://github.com/stefanprodan/dockprom + name: stefanprodan/dockprom + status: healthy + stars: 6510 + forks: 1759 + last_push: 2026-03-06T05:28:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager. + - url: https://github.com/amerkurev/doku + name: amerkurev/doku + status: healthy + stars: 416 + forks: 18 + last_push: 2025-12-26T09:13:21Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Doku is a simple web-based application that allows you to monitor Docker disk usage. + - url: https://github.com/CodesWhat/drydock + name: CodesWhat/drydock + status: healthy + stars: 198 + forks: 10 + last_push: 2026-05-18T20:53:37Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Container update monitoring with web dashboard, 23 registry providers, 20 notification triggers, and distributed agent architecture. + - url: https://github.com/kolapsis/maintenant + name: kolapsis/maintenant + status: healthy + stars: 271 + forks: 12 + last_push: 2026-05-18T10:12:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: Self-discovering infrastructure monitoring for Docker and Kubernetes. Auto-detects containers via labels, with endpoint monitoring, heartbeats, TLS certificates, resource metrics, update intelligence, and a built-in status page. Single binary with embedded SPA. + - url: https://github.com/codeofmario/wiremap + name: codeofmario/wiremap + status: healthy + stars: 3 + forks: 1 + last_push: 2026-05-02T14:16:22Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Observability + description: A self-hosted visual Docker network topology explorer with real-time log streaming, live stats, embedded terminal, and container inspection. + - url: https://github.com/dash14/buildcage + name: dash14/buildcage + status: healthy + stars: 4 + last_push: 2026-05-17T20:24:03Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Restricts outbound network access during Docker builds to prevent supply chain attacks, working as a drop-in BuildKit remote driver for Docker Buildx, with ready-to-use GitHub Actions. + - url: https://github.com/hectorm/cetusguard + name: hectorm/cetusguard + status: healthy + stars: 85 + forks: 2 + last_push: 2026-04-01T13:49:35Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: CetusGuard is a tool that protects the Docker daemon socket by filtering calls to its API endpoints. + - url: https://github.com/bridgecrewio/checkov + name: bridgecrewio/checkov + status: healthy + stars: 8720 + forks: 1336 + last_push: 2026-05-14T23:16:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Static analysis for infrastructure as code manifests (Terraform, Kubernetes, Cloudformation, Helm, Dockerfile, Kustomize) find security misconfiguration and fix them. + - url: https://github.com/google/container-explorer + name: google/container-explorer + status: healthy + stars: 96 + forks: 10 + last_push: 2026-05-05T12:36:48Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Forensic utility to explore Docker and containerd container details from mounted disk images. + - url: https://github.com/deepfence/ThreatMapper + name: deepfence/ThreatMapper + status: healthy + stars: 5268 + forks: 635 + last_push: 2026-05-13T07:51:41Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Powerful runtime vulnerability scanner for kubernetes, virtual machines and serverless. + - url: https://github.com/us/den + name: us/den + status: healthy + stars: 7 + forks: 1 + last_push: 2026-03-15T14:07:59Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Self-hosted sandbox runtime for AI agents with Docker containers, security hardening, REST API and WebSocket support. + - url: https://github.com/docker/docker-bench-security + name: docker/docker-bench-security + status: inactive + stars: 9636 + forks: 1038 + last_push: 2024-10-21T07:26:06Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Script that checks for dozens of common best-practices around deploying Docker containers in production. + - url: https://github.com/Tecnativa/docker-socket-proxy + name: Tecnativa/docker-socket-proxy + status: healthy + stars: 2506 + forks: 198 + last_push: 2026-02-25T08:15:08Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: HAProxy-based fine-grained filter for the Docker API socket; widely used to expose a restricted socket to reverse proxies and homelab stacks. + - url: https://github.com/checkmarx/kics + name: checkmarx/kics + status: healthy + stars: 2634 + forks: 367 + last_push: 2026-04-22T14:47:48Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: An infrastructure-as-code scanning tool, find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle. Can be extended for additional policies. + - url: https://github.com/dormstern/segspec + name: dormstern/segspec + status: healthy + stars: 15 + last_push: 2026-05-06T07:36:28Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Extracts network dependencies from Docker Compose, Kubernetes manifests, Helm charts, and other config files to generate Kubernetes NetworkPolicies with evidence tracing. + - url: https://github.com/falcosecurity/falco + name: falcosecurity/falco + status: healthy + stars: 8955 + forks: 1018 + last_push: 2026-05-18T15:45:32Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Security + description: Sysdig Falco is an open source container security monitor. It can monitor application, container, host, and network activity and alert on unauthorized activity. + - url: https://github.com/AbianS/docker-db-manager + name: AbianS/docker-db-manager + status: healthy + stars: 161 + forks: 5 + last_push: 2026-04-12T18:29:18Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Desktop + description: Desktop app for managing Docker database containers with visual interface and one-click operations. + - url: https://github.com/felixgborrego/simple-docker-ui + name: felixgborrego/simple-docker-ui + status: inactive + stars: 603 + forks: 96 + last_push: 2024-09-06T09:31:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Desktop + description: Built on Electron. + - url: https://github.com/slonopotamus/stevedore + name: slonopotamus/stevedore + status: healthy + stars: 372 + forks: 13 + last_push: 2026-04-13T09:17:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Desktop + description: Good Docker Desktop replacement for Windows. Both Linux and Windows Containers are supported. [slonopotamus](https://github.com/slonopotamus). + - url: https://github.com/jr-k/d4s + name: jr-k/d4s + status: healthy + stars: 83 + forks: 7 + last_push: 2026-05-12T21:41:45Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A fast, keyboard-driven terminal UI to manage Docker containers, Compose stacks, and Swarm services with the ergonomics of K9s. + - url: https://github.com/Falldog/dcinja + name: Falldog/dcinja + status: healthy + stars: 14 + forks: 3 + last_push: 2025-06-26T12:33:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: The powerful and smallest binary size of template engine for docker command line environment. + - url: https://github.com/FabienD/docker-stack + name: FabienD/docker-stack + status: healthy + stars: 23 + forks: 2 + last_push: 2026-04-14T17:03:45Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Dctl is a Cli tool that helps developers by allowing them to execute all docker compose commands anywhere in the terminal, and more. + - url: https://github.com/s0rg/decompose + name: s0rg/decompose + status: healthy + stars: 134 + forks: 6 + last_push: 2026-04-08T19:31:21Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Reverse-engineering tool for docker environments. + - url: https://github.com/wagoodman/dive + name: wagoodman/dive + status: healthy + stars: 53952 + forks: 1996 + last_push: 2025-12-15T17:20:36Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A tool for exploring each layer in a docker image. + - url: https://github.com/christian-korneck/docker-pushrm + name: christian-korneck/docker-pushrm + status: inactive + stars: 151 + forks: 3 + last_push: 2024-06-10T21:42:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A Docker CLI plugin that lets you push the README.md file from the current directory to Docker Hub. Also supports Quay and Harbor. + - url: https://github.com/lucabello/docker-captain + name: lucabello/docker-captain + status: healthy + stars: 2 + last_push: 2026-04-25T00:13:57Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A friendly CLI to manage multiple Docker Compose deployments with style — powered by Typer, Rich, questionary, and sh. + - url: https://github.com/spotify/dockerfile-mode + name: spotify/dockerfile-mode + status: healthy + stars: 564 + forks: 84 + last_push: 2025-12-21T16:45:00Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: An Emacs mode for handling Dockerfiles. + - url: https://github.com/patrickhoefler/dockerfilegraph + name: patrickhoefler/dockerfilegraph + status: healthy + stars: 264 + forks: 17 + last_push: 2026-05-16T08:01:28Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Visualize your multi-stage Dockerfiles. + - url: https://github.com/lirantal/dockly + name: lirantal/dockly + status: healthy + stars: 4015 + forks: 164 + last_push: 2026-05-18T08:16:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: An interactive shell UI for managing Docker containers. + - url: https://github.com/shubh-io/dockmate + name: shubh-io/dockmate + status: healthy + stars: 314 + forks: 5 + last_push: 2026-04-06T07:04:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Lightweight terminal-based Docker and Podman manager with a text-based user interface,. + - url: https://github.com/GhostWriters/DockSTARTer + name: GhostWriters/DockSTARTer + status: healthy + stars: 2560 + forks: 291 + last_push: 2026-05-18T07:11:11Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: DockSTARTer helps you get started with home server apps running in Docker. + - url: https://github.com/durableprogramming/dprs + name: durableprogramming/dprs + status: healthy + stars: 38 + forks: 1 + last_push: 2026-03-05T15:59:19Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A developer-focused TUI for managing Docker containers with real-time log streaming and container management. + - url: https://github.com/moncho/dry + name: moncho/dry + status: healthy + stars: 3250 + forks: 103 + last_push: 2026-04-09T12:13:58Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: An interactive CLI for Docker containers. + - url: https://github.com/joao-zanutto/easydocker + name: joao-zanutto/easydocker + status: healthy + stars: 112 + forks: 4 + last_push: 2026-05-16T18:06:58Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A Terminal UI highly inpired by k9s levaraging beatiful BubbleTea graphics. + - url: https://github.com/ajayd-san/gomanagedocker + name: ajayd-san/gomanagedocker + status: inactive + stars: 637 + forks: 26 + last_push: 2024-12-28T07:44:20Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: TUI tool to view and manage your docker objects blazingly fast with sensible keybindings, also supports VIM navigation out of the box. + - url: https://github.com/jesseduffield/lazydocker + name: jesseduffield/lazydocker + status: healthy + stars: 51076 + forks: 1614 + last_push: 2026-04-19T02:51:06Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: The lazier way to manage everything docker. A simple terminal UI for both docker and docker-compose, written in Go with the gocui library. + - url: https://github.com/Lifailon/lazyjournal + name: Lifailon/lazyjournal + status: healthy + stars: 1267 + forks: 31 + last_push: 2026-05-06T07:54:47Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A interface for reading and filtering the logs output of Docker and Podman containers like [Dozzle](dozzle) but for the terminal with support for fuzzy find, regex and output coloring. + - url: https://github.com/mrjackwills/oxker + name: mrjackwills/oxker + status: healthy + stars: 1668 + forks: 46 + last_push: 2026-05-13T20:31:32Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A simple tui to view & control docker containers. + - url: https://github.com/shiwaforce/poco + name: shiwaforce/poco + status: healthy + stars: 113 + forks: 6 + last_push: 2026-02-28T12:31:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Proco will help you to organise and manage Docker, Docker-Compose, Kubernetes projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment. + - url: https://github.com/JonathonReinhart/scuba + name: JonathonReinhart/scuba + status: healthy + stars: 97 + forks: 17 + last_push: 2026-01-26T04:03:05Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Transparently use Docker containers to encapsulate software build environments,. + - url: https://github.com/segersniels/supdock + name: segersniels/supdock + status: healthy + stars: 85 + forks: 3 + last_push: 2026-04-04T11:25:22Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Allows for slightly more visual usage of Docker with an interactive prompt. + - url: https://github.com/Eldara-Tech/swarmcli + name: Eldara-Tech/swarmcli + status: healthy + stars: 15 + forks: 7 + last_push: 2026-05-18T13:24:50Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: Swarm Management at the speed of thought — with real-time log streaming, instant shell access to containers, seamless port forwarding, and on-demand secret reveal capabilities, giving you full control over your Docker Swarm without breaking your flow. + - url: https://github.com/pivovarit/tdocker + name: pivovarit/tdocker + status: healthy + stars: 84 + forks: 3 + last_push: 2026-05-16T06:18:16Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A `docker ps` replacement for everyday container operations. + - url: https://github.com/idesyatov/wharf + name: idesyatov/wharf + status: healthy + stars: 3 + last_push: 2026-05-05T21:32:22Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Terminal + description: A k9s-inspired TUI for Docker Compose with vim-style navigation, real-time CPU/MEM monitoring with braille charts, container file browser, SSH remote host support, and command mode. + - url: https://github.com/getarcaneapp/arcane + name: getarcaneapp/arcane + status: healthy + stars: 5540 + forks: 196 + last_push: 2026-05-18T20:58:23Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: An easy and modern Docker management platform, built with everybody in mind. + - url: https://github.com/knrdl/casa + name: knrdl/casa + status: healthy + stars: 85 + forks: 6 + last_push: 2026-05-18T07:49:43Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Outsource the administration of a handful of containers to your co-workers,. + - url: https://github.com/wrfly/container-web-tty + name: wrfly/container-web-tty + status: healthy + stars: 258 + forks: 46 + last_push: 2026-04-16T20:52:12Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Connect your containers via a web-tty. + - url: https://github.com/klausmeyer/docker-registry-browser + name: klausmeyer/docker-registry-browser + status: healthy + stars: 686 + forks: 62 + last_push: 2026-05-16T09:56:13Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Web Interface for the Docker Registry HTTP API v2. + - url: https://github.com/dockersamples/docker-swarm-visualizer + name: dockersamples/docker-swarm-visualizer + status: inactive + stars: 3348 + forks: 594 + last_push: 2024-10-26T07:12:05Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Visualizes Docker services on a Docker Swarm (for running demos). + - url: https://github.com/louislam/dockge + name: louislam/dockge + status: healthy + stars: 23237 + forks: 749 + last_push: 2026-04-25T02:28:26Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager. + - url: https://github.com/mbecker20/komodo + name: mbecker20/komodo + status: healthy + stars: 11195 + forks: 318 + last_push: 2026-05-12T01:45:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: A tool to build and deploy software on many servers. + - url: https://github.com/portainer/portainer + name: portainer/portainer + status: healthy + stars: 37470 + forks: 2825 + last_push: 2026-05-18T14:08:03Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: A lightweight management UI for managing your Docker hosts or Docker Swarm clusters. + - url: https://github.com/swarmpit/swarmpit + name: swarmpit/swarmpit + status: healthy + stars: 3438 + forks: 312 + last_push: 2026-05-14T19:15:12Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: Swarmpit provides simple and easy to use interface for your Docker Swarm cluster. You can manage your stacks, services, secrets, volumes, networks etc. + - url: https://github.com/fr4nsys/usulnet + name: fr4nsys/usulnet + status: healthy + stars: 97 + forks: 5 + last_push: 2026-05-16T18:56:39Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > User Interfaces > Web + description: A complete and modern Docker management platform designed for sysadmin, devops with enterprise grade tools, cve scanner, ssh, rdp on web and much more. + - url: https://github.com/lispyclouds/contajners + name: lispyclouds/contajners + status: healthy + stars: 149 + forks: 8 + last_push: 2026-04-14T19:20:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: An idiomatic, data-driven, REPL friendly Clojure client for OCI container engines. + - url: https://github.com/gesellix/docker-client + name: gesellix/docker-client + status: healthy + stars: 121 + forks: 28 + last_push: 2026-05-14T16:53:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: A Docker remote api client library for the JVM, written in Groovy. + - url: https://github.com/dgongut/docker-controller-bot + name: dgongut/docker-controller-bot + status: healthy + stars: 247 + forks: 33 + last_push: 2026-05-07T16:18:27Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: Telegram bot to control docker containers. + - url: https://github.com/fabric8io/docker-maven-plugin + name: fabric8io/docker-maven-plugin + status: healthy + stars: 1930 + forks: 655 + last_push: 2026-04-01T04:59:19Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: A Maven plugin for running and creating Docker images. + - url: https://github.com/Microsoft/Docker.DotNet + name: Microsoft/Docker.DotNet + status: healthy + stars: 2411 + forks: 411 + last_push: 2025-08-28T14:08:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: C#/.NET HTTP client for the Docker remote API. + - url: https://github.com/ChangemakerStudios/Docker.Registry.DotNet + name: ChangemakerStudios/Docker.Registry.DotNet + status: healthy + stars: 42 + forks: 22 + last_push: 2025-10-06T03:43:52Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: .NET (C#) Client Library for interacting with a Docker Registry API (v2). + - url: https://github.com/apocas/dockerode + name: apocas/dockerode + status: healthy + stars: 4891 + forks: 488 + last_push: 2026-05-13T09:09:35Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: Docker Remote API node.js module. + - url: https://github.com/fsouza/go-dockerclient + name: fsouza/go-dockerclient + status: healthy + stars: 2238 + forks: 556 + last_push: 2026-05-11T03:54:15Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/gesellix/gradle-docker-plugin + name: gesellix/gradle-docker-plugin + status: healthy + stars: 81 + forks: 17 + last_push: 2026-05-12T20:22:08Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: A Docker remote api plugin for Gradle. + - url: https://github.com/greenled/portainer-stack-utils + name: greenled/portainer-stack-utils + status: healthy + stars: 74 + forks: 16 + last_push: 2025-12-05T02:34:50Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: Bash script to deploy/update/undeploy Docker stacks in a Portainer instance from a docker-compose yaml file. + - url: https://github.com/marcuslonnberg/sbt-docker + name: marcuslonnberg/sbt-docker + status: inactive + stars: 733 + forks: 113 + last_push: 2024-12-12T15:18:45Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > API Client + description: Create Docker images directly from sbt. + - url: https://github.com/harbur/captain + name: harbur/captain + status: healthy + stars: 776 + forks: 48 + last_push: 2025-05-25T00:09:20Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Convert your Git workflow to Docker containers ready for Continuous Delivery. + - url: https://github.com/DefangLabs/defang + name: DefangLabs/defang + status: healthy + stars: 152 + forks: 25 + last_push: 2026-05-18T07:27:39Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Deploy Docker Compose to your favorite cloud in minutes. + - url: https://github.com/crazy-max/diun + name: crazy-max/diun + status: healthy + stars: 4664 + forks: 148 + last_push: 2026-05-16T11:01:06Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Receive notifications when an image or repository is updated on a Docker registry. + - url: https://github.com/mag37/dockcheck + name: mag37/dockcheck + status: healthy + stars: 2328 + forks: 85 + last_push: 2026-05-15T12:20:42Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: A script checking updates for docker images without pulling then auto-update selected/all containers. With notifications, pruning and more. + - url: https://github.com/jenkinsci/docker-plugin + name: jenkinsci/docker-plugin + status: healthy + stars: 498 + forks: 325 + last_push: 2026-05-01T19:56:24Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/drone/drone + name: drone/drone + status: healthy + stars: 35900 + forks: 3131 + last_push: 2026-05-18T09:23:18Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Continuous integration server built on Docker and configured using YAML files. + - url: https://github.com/shizunge/gantry + name: shizunge/gantry + status: healthy + stars: 88 + forks: 4 + last_push: 2026-05-12T22:46:38Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Automatically update selected Docker swarm services. + - url: https://github.com/theSage21/jaypore_ci + name: theSage21/jaypore_ci + status: healthy + stars: 37 + forks: 4 + last_push: 2026-03-07T17:18:09Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Simple, very flexible, powerful CI / CD / automation system configured in Python. Offline and local first. + - url: https://github.com/Kraken-CI/kraken + name: Kraken-CI/kraken + status: healthy + stars: 160 + forks: 20 + last_push: 2026-01-15T13:00:32Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Modern CI/CD, open-source, on-premise system that is highly scalable and focused on testing. One of its executors is Docker. Developed. + - url: https://github.com/Stratoscale/skipper + name: Stratoscale/skipper + status: healthy + stars: 49 + forks: 22 + last_push: 2026-05-17T10:55:56Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > CI/CD + description: Easily dockerize your Git repository. + - url: https://github.com/coder/coder + name: coder/coder + status: healthy + stars: 13236 + forks: 1296 + last_push: 2026-05-18T21:21:02Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Remote development machines powered by Terraform or Docker. + - url: https://github.com/whatwedo/dde + name: whatwedo/dde + status: healthy + stars: 45 + forks: 9 + last_push: 2026-05-18T21:23:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Local development environment toolset based on Docker. + - url: https://github.com/bibendi/dip + name: bibendi/dip + status: healthy + stars: 1332 + forks: 50 + last_push: 2026-05-18T17:40:08Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: CLI utility for straightforward provisioning and interacting with an application configured by docker-compose. + - url: https://github.com/EnvCLI/EnvCLI + name: EnvCLI/EnvCLI + status: healthy + stars: 116 + forks: 4 + last_push: 2025-06-16T20:36:16Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Replace your local installation of Node, Go, ... with project-specific docker containers. + - url: https://github.com/moshebe/gebug + name: moshebe/gebug + status: healthy + stars: 633 + forks: 17 + last_push: 2026-05-08T06:15:40Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: A tool that makes debugging of Dockerized Go applications super easy by enabling Debugger and Hot-Reload features, seamlessly. + - url: https://github.com/potterwhite/HarborPilot + name: potterwhite/HarborPilot + status: healthy + stars: 2 + last_push: 2026-05-18T01:14:58Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Automated multi-platform Docker image builder for embedded Linux development (RK3588, RV1126, RK3568). Features three-layer config inheritance, PORT_SLOT-based port allocation, and cross-version Ubuntu support (20.04/22.04/24.04). + - url: https://github.com/lando/lando + name: lando/lando + status: healthy + stars: 4232 + forks: 520 + last_push: 2026-04-28T22:30:42Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Lando is for developers who want to quickly specify and painlessly spin up the services and tools needed to develop their projects. + - url: https://github.com/uniget-org/cli + name: uniget-org/cli + status: healthy + stars: 20 + last_push: 2026-05-12T14:55:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Uni(versal)get, the installer and updater for container tools and beyond (formerly docker-setup). + - url: https://github.com/deluan/zsh-in-docker + name: deluan/zsh-in-docker + status: inactive + stars: 1106 + forks: 122 + last_push: 2024-09-30T19:07:49Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Development Environment + description: Install Zsh, Oh-My-Zsh and plugins inside a Docker container with one line!. + - url: https://github.com/apache/openwhisk + name: apache/openwhisk + status: healthy + stars: 6778 + forks: 1177 + last_push: 2026-05-07T14:42:56Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Serverless + description: A serverless, open source cloud platform that executes functions in response to events at any scale. + - url: https://github.com/openfaas/faas + name: openfaas/faas + status: healthy + stars: 26151 + forks: 1968 + last_push: 2026-04-01T14:03:53Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Serverless + description: A complete serverless functions framework for Docker and Kubernetes. + - url: https://github.com/GoogleContainerTools/container-structure-test + name: GoogleContainerTools/container-structure-test + status: healthy + stars: 2477 + forks: 206 + last_push: 2026-04-15T19:06:22Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Testing + description: A framework to validate the structure of an image by checking the outputs of commands or the contents of the filesystem. + - url: https://github.com/kurtosis-tech/kurtosis + name: kurtosis-tech/kurtosis + status: healthy + stars: 539 + forks: 96 + last_push: 2026-05-18T19:15:12Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Testing + description: 'A composable build system for multi-container test environments that provides developers with: a powerful Python-like SDK for environment configuration, a compile-time validator to verify environment behavior & setup, and a runtime for environment execution, monitoring, & debugging capabilities.' + - url: https://github.com/alexei-led/pumba + name: alexei-led/pumba + status: healthy + stars: 3025 + forks: 204 + last_push: 2026-05-11T03:24:44Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Testing + description: Chaos testing tool for Docker. Can be deployed on kubernetes and CoreOS cluster. + - url: https://github.com/artsy/hokusai + name: artsy/hokusai + status: healthy + stars: 97 + forks: 25 + last_push: 2026-03-23T08:23:07Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Wrappers + description: A Docker + Kubernetes CLI for application developers; used to containerize an application and to manage its lifecycle throughout development, testing, and release cycles. From [artsy](https://github.com/artsy). + - url: https://github.com/livecycle/preevy + name: livecycle/preevy + status: healthy + stars: 2209 + forks: 89 + last_push: 2026-02-06T07:38:46Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Wrappers + description: Preview environments for Docker and Docker Compose projects. Test your changes and get feedback from devs and non-devs (Product/Design) by deploying pull requests to the your cloud provider as part of your CI pipeline. + - url: https://github.com/subuser-security/subuser + name: subuser-security/subuser + status: inactive + stars: 894 + forks: 63 + last_push: 2025-02-23T11:31:31Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Wrappers + description: Makes it easy to securely and portably run graphical desktop applications in Docker. + - url: https://github.com/indigo-dc/udocker + name: indigo-dc/udocker + status: healthy + stars: 1744 + forks: 167 + last_push: 2025-08-13T17:21:57Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > Developer Workflow > Wrappers + description: A tool to execute simple docker containers in batch or interactive systems without root privileges. + - url: https://github.com/iximiuz/cdebug + name: iximiuz/cdebug + status: healthy + stars: 1645 + forks: 67 + last_push: 2026-01-18T19:11:25Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Swiss-army knife for debugging running containers via ephemeral sidecars; works with Docker, containerd, and Kubernetes. + - url: https://github.com/nicomt/ckron + name: nicomt/ckron + status: healthy + stars: 56 + forks: 6 + last_push: 2026-02-15T17:58:14Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: A cron-style job scheduler for docker,. + - url: https://github.com/jwilder/docker-gen + name: jwilder/docker-gen + status: healthy + stars: 4627 + forks: 613 + last_push: 2026-05-11T08:49:02Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Generate files from docker container meta-data. + - url: https://github.com/powerman/dockerize + name: powerman/dockerize + status: healthy + stars: 194 + forks: 18 + last_push: 2026-05-04T22:40:14Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Utility to simplify running applications in docker containers. + - url: https://github.com/tianon/gosu + name: tianon/gosu + status: healthy + stars: 4969 + forks: 358 + last_push: 2026-03-04T18:27:37Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Run this specific application as this specific user and get out of the pipeline (entrypoint script tool). + - url: https://github.com/sindresorhus/is-docker + name: sindresorhus/is-docker + status: healthy + stars: 233 + forks: 15 + last_push: 2025-09-15T21:04:10Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Check if the process is running inside a Docker container. + - url: https://github.com/tarampampam/microcheck + name: tarampampam/microcheck + status: healthy + stars: 142 + forks: 2 + last_push: 2026-05-08T09:33:51Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Lightweight health check utilities for Docker containers (75 KB instead of 9.3 MB for httpcheck versus cURL) in pure C - http(s), port checks, and parallel execution are included. + - url: https://github.com/mcuadros/ofelia + name: mcuadros/ofelia + status: healthy + stars: 3845 + forks: 203 + last_push: 2026-05-07T16:54:33Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + - url: https://github.com/ncopa/su-exec + name: ncopa/su-exec + status: healthy + stars: 1018 + forks: 103 + last_push: 2025-10-07T13:49:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: This is a simple tool that will simply execute a program with different privileges. The program will be executed directly and not run as a child, like su and sudo does, which avoids TTY and signal issues. Why reinvent gosu? This does more or less exactly the same thing as gosu but it is only 10kb instead of 1.8MB. + - url: https://github.com/aptible/supercronic + name: aptible/supercronic + status: healthy + stars: 2498 + forks: 141 + last_push: 2026-04-23T12:10:59Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Projects > In-Container Tooling + description: Crontab-compatible job runner, designed specifically to run in containers. + - url: https://github.com/docker/awesome-compose + name: docker/awesome-compose + status: healthy + stars: 45326 + forks: 8149 + last_push: 2026-05-09T12:17:01Z + has_license: true + checked_at: 2026-05-18T21:29:20.484404Z + category: Learning Resources > Awesome Lists + description: Docker Compose samples. diff --git a/config/website.tmpl.html b/config/website.tmpl.html new file mode 100644 index 000000000..58ea2cb30 --- /dev/null +++ b/config/website.tmpl.html @@ -0,0 +1,725 @@ + + + + + + + Awesome-docker + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..2f7d4f108 --- /dev/null +++ b/go.mod @@ -0,0 +1,34 @@ +module github.com/veggiemonk/awesome-docker + +go 1.26.3 + +require ( + charm.land/bubbletea/v2 v2.0.8 + charm.land/lipgloss/v2 v2.0.5 + github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed + github.com/spf13/cobra v1.10.2 + github.com/yuin/goldmark v1.8.5 + golang.org/x/oauth2 v0.36.0 + gopkg.in/yaml.v3 v3.0.1 +) + +require ( + github.com/charmbracelet/colorprofile v0.4.3 // indirect + github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7 // indirect + github.com/charmbracelet/x/ansi v0.11.7 // indirect + github.com/charmbracelet/x/term v0.2.2 // indirect + github.com/charmbracelet/x/termios v0.1.1 // indirect + github.com/charmbracelet/x/windows v0.2.2 // indirect + github.com/clipperhouse/displaywidth v0.11.0 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/lucasb-eyer/go-colorful v1.4.0 // indirect + github.com/mattn/go-runewidth v0.0.23 // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + golang.org/x/sync v0.21.0 // indirect + golang.org/x/sys v0.46.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..cce82ccae --- /dev/null +++ b/go.sum @@ -0,0 +1,62 @@ +charm.land/bubbletea/v2 v2.0.8 h1:SxTJMhCAI3lbPmy4SgX5LWZ24AdINr4I6UEqzZvYJuY= +charm.land/bubbletea/v2 v2.0.8/go.mod h1:2SkdgoTXluXJHOUwAoRlRXF/28vklb1rFl6GcgV1/ss= +charm.land/lipgloss/v2 v2.0.5 h1:kbNxgeeUOYv5J0YdpxFjfvf3dFvqH8Aci4zB6xqFtrY= +charm.land/lipgloss/v2 v2.0.5/go.mod h1:9oqhxt4yxIMe6q5A4kHr44DremZk7J9UNh74GlWa5nc= +github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= +github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w= +github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q= +github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q= +github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7 h1:3FmWoGNWK4STvqg0O0Aeav2T7rodWJAPeF0QpH+8gFw= +github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7/go.mod h1:f/jRa757WUmaOZrbPspXymbg/GnbF+rwe4OLsG7aXYo= +github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI= +github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ= +github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA= +github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I= +github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= +github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= +github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY= +github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= +github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM= +github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= +github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= +github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= +github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= +github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= +github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw= +github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed h1:KT7hI8vYXgU0s2qaMkrfq9tCA1w/iEPgfredVP+4Tzw= +github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed/go.mod h1:zqMwyHmnN/eDOZOdiTohqIUKUrTFX62PNlu7IJdu0q8= +github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf h1:o1uxfymjZ7jZ4MsgCErcwWGtVKSiNAXtS59Lhs6uI/g= +github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf/go.mod h1:9dIRpgIY7hVhoqfe0/FcYp0bpInZaT7dc3BYOprrIUE= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yuin/goldmark v1.8.5 h1:r6N5afV5qj/5S4UTch8agZHJ8UxNCMwX7WjkkJam2NA= +github.com/yuin/goldmark v1.8.5/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/index.html b/index.html index 572c81624..2cc7b5c74 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,10 @@ - + Awesome-docker -

We moved to a new place, click here to be redirected.

+

Redirecting to the generated site.

- \ No newline at end of file + diff --git a/internal/builder/builder.go b/internal/builder/builder.go new file mode 100644 index 000000000..20b180840 --- /dev/null +++ b/internal/builder/builder.go @@ -0,0 +1,76 @@ +package builder + +import ( + "bytes" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/yuin/goldmark" + "github.com/yuin/goldmark/extension" + "github.com/yuin/goldmark/parser" + "github.com/yuin/goldmark/renderer/html" +) + +// Build converts a Markdown file to HTML using a template. +// The template must contain a placeholder element that will be replaced with the rendered content. +func Build(markdownPath, templatePath, outputPath string) error { + md, err := os.ReadFile(markdownPath) + if err != nil { + return fmt.Errorf("read markdown: %w", err) + } + + tmpl, err := os.ReadFile(templatePath) + if err != nil { + return fmt.Errorf("read template: %w", err) + } + + // Convert markdown to HTML + gm := goldmark.New( + goldmark.WithExtensions(extension.GFM), + goldmark.WithParserOptions(parser.WithAutoHeadingID()), + goldmark.WithRendererOptions(html.WithUnsafe()), + ) + var buf bytes.Buffer + if err := gm.Convert(md, &buf); err != nil { + return fmt.Errorf("convert markdown: %w", err) + } + + // Inject into template — support both placeholder formats + output := string(tmpl) + replacements := []struct { + old string + new string + }{ + { + old: `
`, + new: `
` + buf.String() + `
`, + }, + { + old: `
`, + new: `
` + buf.String() + `
`, + }, + } + + replaced := false + for _, r := range replacements { + if strings.Contains(output, r.old) { + output = strings.Replace(output, r.old, r.new, 1) + replaced = true + break + } + } + if !replaced { + return errors.New("template missing supported markdown placeholder") + } + + // outputPath is a CLI-provided destination for a generated website file; + // the user controls the destination by design, so the taint warning is expected. + //nolint:gosec // G306,G304: user-supplied output path is intentional for this CLI + if err := os.WriteFile(filepath.Clean(outputPath), []byte(output), 0o644); err != nil { + return fmt.Errorf("write output: %w", err) + } + return nil +} diff --git a/internal/builder/builder_test.go b/internal/builder/builder_test.go new file mode 100644 index 000000000..19ee91214 --- /dev/null +++ b/internal/builder/builder_test.go @@ -0,0 +1,172 @@ +package builder + +import ( + "os" + "path/filepath" + "strings" + "testing" +) + +func TestBuild(t *testing.T) { + dir := t.TempDir() + + md := "# Test List\n\n- [Example](https://example.com) - A test entry.\n" + mdPath := filepath.Join(dir, "README.md") + if err := os.WriteFile(mdPath, []byte(md), 0o644); err != nil { + t.Fatal(err) + } + + tmpl := ` + + +
+ +` + tmplPath := filepath.Join(dir, "template.html") + if err := os.WriteFile(tmplPath, []byte(tmpl), 0o644); err != nil { + t.Fatal(err) + } + + outPath := filepath.Join(dir, "index.html") + if err := Build(mdPath, tmplPath, outPath); err != nil { + t.Fatalf("Build failed: %v", err) + } + + content, err := os.ReadFile(outPath) + if err != nil { + t.Fatal(err) + } + + html := string(content) + if !strings.Contains(html, "Test List") { + t.Error("expected 'Test List' in output") + } + if !strings.Contains(html, "https://example.com") { + t.Error("expected link in output") + } +} + +func TestBuildWithSectionPlaceholder(t *testing.T) { + dir := t.TempDir() + + md := "# Hello\n\nWorld.\n" + mdPath := filepath.Join(dir, "README.md") + if err := os.WriteFile(mdPath, []byte(md), 0o644); err != nil { + t.Fatal(err) + } + + // This matches the actual template format + tmpl := ` + + +
+ +` + tmplPath := filepath.Join(dir, "template.html") + if err := os.WriteFile(tmplPath, []byte(tmpl), 0o644); err != nil { + t.Fatal(err) + } + + outPath := filepath.Join(dir, "index.html") + if err := Build(mdPath, tmplPath, outPath); err != nil { + t.Fatalf("Build failed: %v", err) + } + + content, err := os.ReadFile(outPath) + if err != nil { + t.Fatal(err) + } + + if !strings.Contains(string(content), "Hello") { + t.Error("expected 'Hello' in output") + } + if !strings.Contains(string(content), `class="main-content"`) { + t.Error("expected section class preserved") + } +} + +func TestBuildRealREADME(t *testing.T) { + mdPath := "../../README.md" + tmplPath := "../../config/website.tmpl.html" + if _, err := os.Stat(mdPath); err != nil { + t.Skip("README.md not found") + } + if _, err := os.Stat(tmplPath); err != nil { + t.Skip("website template not found") + } + + dir := t.TempDir() + outPath := filepath.Join(dir, "index.html") + + if err := Build(mdPath, tmplPath, outPath); err != nil { + t.Fatalf("Build failed: %v", err) + } + + info, err := os.Stat(outPath) + if err != nil { + t.Fatal(err) + } + if info.Size() < 10000 { + t.Errorf("output too small: %d bytes", info.Size()) + } + t.Logf("Generated %d bytes", info.Size()) +} + +func TestBuildFailsWithoutPlaceholder(t *testing.T) { + dir := t.TempDir() + + mdPath := filepath.Join(dir, "README.md") + if err := os.WriteFile(mdPath, []byte("# Title\n"), 0o644); err != nil { + t.Fatal(err) + } + + tmplPath := filepath.Join(dir, "template.html") + if err := os.WriteFile(tmplPath, []byte("
"), 0o644); err != nil { + t.Fatal(err) + } + + outPath := filepath.Join(dir, "index.html") + err := Build(mdPath, tmplPath, outPath) + if err == nil { + t.Fatal("expected Build to fail when template has no supported placeholder") + } +} + +func TestBuildAddsHeadingIDs(t *testing.T) { + dir := t.TempDir() + + md := "# Getting Started\n\n## Next Step\n" + mdPath := filepath.Join(dir, "README.md") + if err := os.WriteFile(mdPath, []byte(md), 0o644); err != nil { + t.Fatal(err) + } + + tmpl := ` + + +
+ +` + tmplPath := filepath.Join(dir, "template.html") + if err := os.WriteFile(tmplPath, []byte(tmpl), 0o644); err != nil { + t.Fatal(err) + } + + outPath := filepath.Join(dir, "index.html") + if err := Build(mdPath, tmplPath, outPath); err != nil { + t.Fatalf("Build failed: %v", err) + } + + content, err := os.ReadFile(outPath) + if err != nil { + t.Fatal(err) + } + + html := string(content) + if !strings.Contains(html, `id="getting-started"`) { + t.Error("expected auto-generated heading id for h1") + } + if !strings.Contains(html, `id="next-step"`) { + t.Error("expected auto-generated heading id for h2") + } +} diff --git a/internal/cache/cache.go b/internal/cache/cache.go new file mode 100644 index 000000000..2ca5a20ba --- /dev/null +++ b/internal/cache/cache.go @@ -0,0 +1,100 @@ +package cache + +import ( + "os" + "strings" + "time" + + "gopkg.in/yaml.v3" +) + +// ExcludeList holds URL prefixes to skip during checking. +type ExcludeList struct { + Domains []string `yaml:"domains"` +} + +// IsExcluded returns true if the URL starts with any excluded prefix. +func (e *ExcludeList) IsExcluded(url string) bool { + for _, d := range e.Domains { + if strings.HasPrefix(url, d) { + return true + } + } + return false +} + +// LoadExcludeList reads an exclude.yaml file. +func LoadExcludeList(path string) (*ExcludeList, error) { + data, err := os.ReadFile(path) + if err != nil { + return nil, err + } + var excl ExcludeList + if err := yaml.Unmarshal(data, &excl); err != nil { + return nil, err + } + return &excl, nil +} + +// HealthEntry stores metadata about a single entry. +type HealthEntry struct { + LastPush time.Time `yaml:"last_push,omitempty"` + CheckedAt time.Time `yaml:"checked_at"` + URL string `yaml:"url"` + Name string `yaml:"name"` + Status string `yaml:"status"` + Category string `yaml:"category,omitempty"` + Description string `yaml:"description,omitempty"` + Stars int `yaml:"stars,omitempty"` + Forks int `yaml:"forks,omitempty"` + HasLicense bool `yaml:"has_license,omitempty"` + HasReadme bool `yaml:"has_readme,omitempty"` +} + +// HealthCache is the full YAML cache file. +type HealthCache struct { + Entries []HealthEntry `yaml:"entries"` +} + +// LoadHealthCache reads a health_cache.yaml file. Returns empty cache if file doesn't exist. +func LoadHealthCache(path string) (*HealthCache, error) { + data, err := os.ReadFile(path) + if err != nil { + if os.IsNotExist(err) { + return &HealthCache{}, nil + } + return nil, err + } + var hc HealthCache + if err := yaml.Unmarshal(data, &hc); err != nil { + return nil, err + } + return &hc, nil +} + +// SaveHealthCache writes the cache to a YAML file. +func SaveHealthCache(path string, hc *HealthCache) error { + data, err := yaml.Marshal(hc) + if err != nil { + return err + } + return os.WriteFile(path, data, 0o644) +} + +// Merge updates the cache with new entries, replacing existing ones by URL. +func (hc *HealthCache) Merge(entries []HealthEntry) { + index := make(map[string]int) + for i := range hc.Entries { + e := &hc.Entries[i] + index[e.URL] = i + } + for i := range entries { + e := &entries[i] + if j, exists := index[e.URL]; exists { + hc.Entries[j] = *e + } else { + index[e.URL] = len(hc.Entries) + hc.Entries = append(hc.Entries, *e) + } + } +} diff --git a/internal/cache/cache_test.go b/internal/cache/cache_test.go new file mode 100644 index 000000000..52a161d28 --- /dev/null +++ b/internal/cache/cache_test.go @@ -0,0 +1,137 @@ +package cache + +import ( + "os" + "path/filepath" + "testing" + "time" +) + +func TestLoadExcludeList(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "exclude.yaml") + content := `domains: + - https://example.com + - https://test.org +` + if err := os.WriteFile(path, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + + excl, err := LoadExcludeList(path) + if err != nil { + t.Fatal(err) + } + if len(excl.Domains) != 2 { + t.Errorf("domains count = %d, want 2", len(excl.Domains)) + } + if !excl.IsExcluded("https://example.com/foo") { + t.Error("expected https://example.com/foo to be excluded") + } + if excl.IsExcluded("https://other.com") { + t.Error("expected https://other.com to NOT be excluded") + } +} + +func TestHealthCacheRoundTrip(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "health.yaml") + + original := &HealthCache{ + Entries: []HealthEntry{ + { + URL: "https://github.com/example/repo", + Name: "Example", + Status: "healthy", + Stars: 42, + LastPush: time.Date(2026, 1, 15, 0, 0, 0, 0, time.UTC), + HasLicense: true, + HasReadme: true, + CheckedAt: time.Date(2026, 2, 27, 9, 0, 0, 0, time.UTC), + }, + }, + } + + if err := SaveHealthCache(path, original); err != nil { + t.Fatal(err) + } + + loaded, err := LoadHealthCache(path) + if err != nil { + t.Fatal(err) + } + if len(loaded.Entries) != 1 { + t.Fatalf("entries = %d, want 1", len(loaded.Entries)) + } + if loaded.Entries[0].Stars != 42 { + t.Errorf("stars = %d, want 42", loaded.Entries[0].Stars) + } +} + +func TestLoadHealthCacheMissing(t *testing.T) { + hc, err := LoadHealthCache("/nonexistent/path.yaml") + if err != nil { + t.Fatal(err) + } + if len(hc.Entries) != 0 { + t.Errorf("entries = %d, want 0 for missing file", len(hc.Entries)) + } +} + +func TestLoadHealthCacheInvalidYAML(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "health.yaml") + if err := os.WriteFile(path, []byte("entries:\n - url: [not yaml"), 0o644); err != nil { + t.Fatal(err) + } + + hc, err := LoadHealthCache(path) + if err == nil { + t.Fatal("expected error for invalid YAML") + } + if hc != nil { + t.Fatal("expected nil cache on invalid YAML") + } +} + +func TestMerge(t *testing.T) { + hc := &HealthCache{ + Entries: []HealthEntry{ + {URL: "https://github.com/a/a", Name: "A", Stars: 10}, + {URL: "https://github.com/b/b", Name: "B", Stars: 20}, + }, + } + + hc.Merge([]HealthEntry{ + {URL: "https://github.com/b/b", Name: "B", Stars: 25}, // update + {URL: "https://github.com/c/c", Name: "C", Stars: 30}, // new + }) + + if len(hc.Entries) != 3 { + t.Fatalf("entries = %d, want 3", len(hc.Entries)) + } + // B should be updated + if hc.Entries[1].Stars != 25 { + t.Errorf("B stars = %d, want 25", hc.Entries[1].Stars) + } + // C should be appended + if hc.Entries[2].Name != "C" { + t.Errorf("last entry = %q, want C", hc.Entries[2].Name) + } +} + +func TestMergeDeduplicatesIncomingBatch(t *testing.T) { + hc := &HealthCache{} + + hc.Merge([]HealthEntry{ + {URL: "https://github.com/c/c", Name: "C", Stars: 1}, + {URL: "https://github.com/c/c", Name: "C", Stars: 2}, + }) + + if len(hc.Entries) != 1 { + t.Fatalf("entries = %d, want 1", len(hc.Entries)) + } + if hc.Entries[0].Stars != 2 { + t.Fatalf("stars = %d, want last value 2", hc.Entries[0].Stars) + } +} diff --git a/internal/checker/github.go b/internal/checker/github.go new file mode 100644 index 000000000..385e6a597 --- /dev/null +++ b/internal/checker/github.go @@ -0,0 +1,172 @@ +package checker + +import ( + "context" + "fmt" + "net/url" + "strings" + "time" + + "github.com/shurcooL/githubv4" + "golang.org/x/oauth2" +) + +// RepoInfo holds metadata about a GitHub repository. +type RepoInfo struct { + PushedAt time.Time + Owner string + Name string + URL string + Stars int + Forks int + IsArchived bool + IsDisabled bool + IsPrivate bool + HasLicense bool +} + +// ExtractGitHubRepo extracts owner/name from a GitHub URL. +// Returns false for non-repo URLs (issues, wiki, apps, etc.). +func ExtractGitHubRepo(rawURL string) (owner, name string, ok bool) { + u, err := url.Parse(rawURL) + if err != nil { + return "", "", false + } + + host := strings.ToLower(u.Hostname()) + if host != "github.com" && host != "www.github.com" { + return "", "", false + } + + path := strings.Trim(u.Path, "/") + parts := strings.Split(path, "/") + if len(parts) != 2 || parts[0] == "" || parts[1] == "" { + return "", "", false + } + + // Skip known non-repository top-level routes. + switch parts[0] { + case "apps", "features", "topics": + return "", "", false + } + + name = strings.TrimSuffix(parts[1], ".git") + if name == "" { + return "", "", false + } + + return parts[0], name, true +} + +func isHTTPURL(raw string) bool { + u, err := url.Parse(raw) + if err != nil { + return false + } + return u.Scheme == "http" || u.Scheme == "https" +} + +func isGitHubAuthError(err error) bool { + if err == nil { + return false + } + s := strings.ToLower(err.Error()) + return strings.Contains(s, "401 unauthorized") || + strings.Contains(s, "bad credentials") || + strings.Contains(s, "resource not accessible by integration") +} + +// PartitionLinks separates URLs into GitHub repos and external HTTP(S) links. +func PartitionLinks(urls []string) (github, external []string) { + for _, url := range urls { + if _, _, ok := ExtractGitHubRepo(url); ok { + github = append(github, url) + } else if isHTTPURL(url) { + external = append(external, url) + } + } + return +} + +// GitHubChecker uses the GitHub GraphQL API. +type GitHubChecker struct { + client *githubv4.Client +} + +// NewGitHubChecker creates a checker with the given OAuth token. +func NewGitHubChecker(token string) *GitHubChecker { + src := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token}) + httpClient := oauth2.NewClient(context.Background(), src) + return &GitHubChecker{client: githubv4.NewClient(httpClient)} +} + +// CheckRepo queries a single GitHub repository. +func (gc *GitHubChecker) CheckRepo(ctx context.Context, owner, name string) (RepoInfo, error) { + var query struct { + Repository struct { + PushedAt time.Time + LicenseInfo *struct{ Name string } + StargazerCount int + ForkCount int + IsArchived bool + IsDisabled bool + IsPrivate bool + } `graphql:"repository(owner: $owner, name: $name)"` + } + + vars := map[string]any{ + "owner": githubv4.String(owner), + "name": githubv4.String(name), + } + + if err := gc.client.Query(ctx, &query, vars); err != nil { + return RepoInfo{}, fmt.Errorf("github query %s/%s: %w", owner, name, err) + } + + r := query.Repository + return RepoInfo{ + Owner: owner, + Name: name, + URL: fmt.Sprintf("https://github.com/%s/%s", owner, name), + IsArchived: r.IsArchived, + IsDisabled: r.IsDisabled, + IsPrivate: r.IsPrivate, + PushedAt: r.PushedAt, + Stars: r.StargazerCount, + Forks: r.ForkCount, + HasLicense: r.LicenseInfo != nil, + }, nil +} + +// CheckRepos queries multiple repos in sequence with rate limiting. +func (gc *GitHubChecker) CheckRepos(ctx context.Context, urls []string, batchSize int) ([]RepoInfo, []error) { + if batchSize <= 0 { + batchSize = 50 + } + + var results []RepoInfo + var errs []error + + for i, url := range urls { + owner, name, ok := ExtractGitHubRepo(url) + if !ok { + continue + } + + info, err := gc.CheckRepo(ctx, owner, name) + if err != nil { + errs = append(errs, err) + if isGitHubAuthError(err) { + break + } + continue + } + results = append(results, info) + + if (i+1)%batchSize == 0 { + time.Sleep(1 * time.Second) + } + } + + return results, errs +} diff --git a/internal/checker/github_test.go b/internal/checker/github_test.go new file mode 100644 index 000000000..6e3b4697a --- /dev/null +++ b/internal/checker/github_test.go @@ -0,0 +1,85 @@ +package checker + +import ( + "errors" + "testing" +) + +func TestExtractGitHubRepo(t *testing.T) { + tests := []struct { + url string + owner string + name string + ok bool + }{ + {"https://github.com/docker/compose", "docker", "compose", true}, + {"https://github.com/moby/moby", "moby", "moby", true}, + {"https://github.com/user/repo/", "user", "repo", true}, + {"https://github.com/user/repo?tab=readme-ov-file", "user", "repo", true}, + {"https://github.com/user/repo#readme", "user", "repo", true}, + {"https://github.com/user/repo.git", "user", "repo", true}, + {"https://www.github.com/user/repo", "user", "repo", true}, + {"https://github.com/user/repo/issues", "", "", false}, + {"https://github.com/user/repo/wiki", "", "", false}, + {"https://github.com/apps/dependabot", "", "", false}, + {"https://example.com/not-github", "", "", false}, + {"https://github.com/user", "", "", false}, + } + + for _, tt := range tests { + owner, name, ok := ExtractGitHubRepo(tt.url) + if ok != tt.ok { + t.Errorf("ExtractGitHubRepo(%q): ok = %v, want %v", tt.url, ok, tt.ok) + continue + } + if ok { + if owner != tt.owner || name != tt.name { + t.Errorf( + "ExtractGitHubRepo(%q) = (%q, %q), want (%q, %q)", + tt.url, + owner, + name, + tt.owner, + tt.name, + ) + } + } + } +} + +func TestPartitionLinks(t *testing.T) { + urls := []string{ + "https://github.com/docker/compose", + "https://example.com/tool", + "https://github.com/moby/moby", + "https://github.com/user/repo/issues", + "dozzle", + "#projects", + } + gh, ext := PartitionLinks(urls) + if len(gh) != 2 { + t.Errorf("github links = %d, want 2", len(gh)) + } + if len(ext) != 2 { + t.Errorf("external links = %d, want 2", len(ext)) + } +} + +func TestIsGitHubAuthError(t *testing.T) { + tests := []struct { + err error + want bool + }{ + {errors.New("non-200 OK status code: 401 Unauthorized body: \"Bad credentials\""), true}, + {errors.New("Resource not accessible by integration"), true}, + {errors.New("dial tcp: lookup api.github.com: no such host"), false}, + {errors.New("context deadline exceeded"), false}, + } + + for _, tt := range tests { + got := isGitHubAuthError(tt.err) + if got != tt.want { + t.Errorf("isGitHubAuthError(%q) = %v, want %v", tt.err, got, tt.want) + } + } +} diff --git a/internal/checker/http.go b/internal/checker/http.go new file mode 100644 index 000000000..8b2a82e5d --- /dev/null +++ b/internal/checker/http.go @@ -0,0 +1,121 @@ +package checker + +import ( + "context" + "net/http" + "sync" + "time" + + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +const ( + defaultTimeout = 30 * time.Second + defaultConcurrency = 10 + userAgent = "awesome-docker-checker/1.0" +) + +// LinkResult holds the result of checking a single URL. +type LinkResult struct { + URL string + RedirectURL string + Error string + StatusCode int + OK bool + Redirected bool +} + +func shouldFallbackToGET(statusCode int) bool { + switch statusCode { + case http.StatusBadRequest, http.StatusForbidden, http.StatusMethodNotAllowed, http.StatusNotImplemented: + return true + default: + return false + } +} + +// CheckLink checks a single URL. Uses HEAD first, falls back to GET. +func CheckLink(url string, client *http.Client) LinkResult { + result := LinkResult{URL: url} + + ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout) + defer cancel() + + // Track redirects + var finalURL string + origCheckRedirect := client.CheckRedirect + client.CheckRedirect = func(req *http.Request, via []*http.Request) error { + finalURL = req.URL.String() + if len(via) >= 10 { + return http.ErrUseLastResponse + } + return nil + } + defer func() { client.CheckRedirect = origCheckRedirect }() + + doRequest := func(method string) (*http.Response, error) { + req, err := http.NewRequestWithContext(ctx, method, url, nil) + if err != nil { + return nil, err + } + req.Header.Set("User-Agent", userAgent) + return client.Do(req) + } + + resp, err := doRequest(http.MethodHead) + if err != nil { + resp, err = doRequest(http.MethodGet) + if err != nil { + result.Error = err.Error() + return result + } + } else if shouldFallbackToGET(resp.StatusCode) { + resp.Body.Close() + resp, err = doRequest(http.MethodGet) + if err != nil { + result.Error = err.Error() + return result + } + } + defer resp.Body.Close() + + result.StatusCode = resp.StatusCode + result.OK = resp.StatusCode >= 200 && resp.StatusCode < 400 + + if finalURL != "" && finalURL != url { + result.Redirected = true + result.RedirectURL = finalURL + } + + return result +} + +// CheckLinks checks multiple URLs concurrently. +func CheckLinks(urls []string, concurrency int, exclude *cache.ExcludeList) []LinkResult { + if concurrency <= 0 { + concurrency = defaultConcurrency + } + + results := make([]LinkResult, len(urls)) + sem := make(chan struct{}, concurrency) + var wg sync.WaitGroup + + for i, url := range urls { + if exclude != nil && exclude.IsExcluded(url) { + results[i] = LinkResult{URL: url, OK: true} + continue + } + + wg.Add(1) + go func(idx int, u string) { + defer wg.Done() + sem <- struct{}{} + defer func() { <-sem }() + client := &http.Client{Timeout: defaultTimeout} + results[idx] = CheckLink(u, client) + }(i, url) + } + + wg.Wait() + return results +} diff --git a/internal/checker/http_test.go b/internal/checker/http_test.go new file mode 100644 index 000000000..e51188d6b --- /dev/null +++ b/internal/checker/http_test.go @@ -0,0 +1,118 @@ +package checker + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +func TestCheckLinkOK(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + + result := CheckLink(server.URL, &http.Client{}) + if !result.OK { + t.Errorf("expected OK, got status %d, error: %s", result.StatusCode, result.Error) + } +} + +func TestCheckLink404(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusNotFound) + })) + defer server.Close() + + result := CheckLink(server.URL, &http.Client{}) + if result.OK { + t.Error("expected not OK for 404") + } + if result.StatusCode != 404 { + t.Errorf("status = %d, want 404", result.StatusCode) + } +} + +func TestCheckLinkRedirect(t *testing.T) { + final := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + })) + defer final.Close() + + redir := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, final.URL, http.StatusMovedPermanently) + })) + defer redir.Close() + + result := CheckLink(redir.URL, &http.Client{}) + if !result.OK { + t.Errorf("expected OK after following redirect, error: %s", result.Error) + } + if !result.Redirected { + t.Error("expected Redirected = true") + } +} + +func TestCheckLinks(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/bad" { + w.WriteHeader(http.StatusNotFound) + return + } + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + + urls := []string{server.URL + "/good", server.URL + "/bad", server.URL + "/also-good"} + results := CheckLinks(urls, 2, nil) + if len(results) != 3 { + t.Fatalf("results = %d, want 3", len(results)) + } + + for _, r := range results { + if r.URL == server.URL+"/bad" && r.OK { + t.Error("expected /bad to not be OK") + } + if r.URL == server.URL+"/good" && !r.OK { + t.Error("expected /good to be OK") + } + } +} + +func TestCheckLinkFallbackToGETOnMethodNotAllowed(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodHead { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + + result := CheckLink(server.URL, &http.Client{}) + if !result.OK { + t.Errorf("expected OK after GET fallback, got status %d, error: %s", result.StatusCode, result.Error) + } + if result.StatusCode != http.StatusOK { + t.Errorf("status = %d, want 200", result.StatusCode) + } +} + +func TestCheckLinkFallbackToGETOnForbiddenHead(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodHead { + w.WriteHeader(http.StatusForbidden) + return + } + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + + result := CheckLink(server.URL, &http.Client{}) + if !result.OK { + t.Errorf("expected OK after GET fallback, got status %d, error: %s", result.StatusCode, result.Error) + } + if result.StatusCode != http.StatusOK { + t.Errorf("status = %d, want 200", result.StatusCode) + } +} diff --git a/internal/linter/fixer.go b/internal/linter/fixer.go new file mode 100644 index 000000000..31ad419c0 --- /dev/null +++ b/internal/linter/fixer.go @@ -0,0 +1,242 @@ +package linter + +import ( + "bufio" + "fmt" + "os" + "regexp" + "strings" + + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +// attributionRe matches trailing author attributions like: +// +// by [@author](url), by [@author][ref], by @author +// +// Also handles "Created by", "Maintained by" etc. +var attributionRe = regexp.MustCompile( + `\s+(?:(?:[Cc]reated|[Mm]aintained|[Bb]uilt)\s+)?by\s+\[@[^\]]+\](?:\([^)]*\)|\[[^\]]*\])\.?$`, +) + +// bareAttributionRe matches: by @author at end of line (no link). +var bareAttributionRe = regexp.MustCompile(`\s+by\s+@\w+\.?$`) + +// sectionHeadingRe matches markdown headings. +var sectionHeadingRe = regexp.MustCompile(`^(#{1,6})\s+(.+?)(?:\s*)?$`) + +// RemoveAttribution strips author attribution from a description string. +func RemoveAttribution(desc string) string { + desc = attributionRe.ReplaceAllString(desc, "") + desc = bareAttributionRe.ReplaceAllString(desc, "") + return strings.TrimSpace(desc) +} + +// FormatEntry reconstructs a markdown list line from a parsed Entry. +func FormatEntry(e parser.Entry) string { + desc := e.Description + var markers []string + for _, m := range e.Markers { + switch m { + case parser.MarkerAbandoned: + markers = append(markers, ":skull:") + case parser.MarkerPaid: + markers = append(markers, ":yen:") + case parser.MarkerWIP: + markers = append(markers, ":construction:") + case parser.MarkerStale: + markers = append(markers, ":ice_cube:") + } + } + if len(markers) > 0 { + desc = strings.Join(markers, " ") + " " + desc + } + return fmt.Sprintf("- [%s](%s) - %s", e.Name, e.URL, desc) +} + +// FixFile reads the README, fixes entries (capitalize, period, remove attribution, +// sort), and writes the result back. +func FixFile(path string) (int, error) { + f, err := os.Open(path) + if err != nil { + return 0, err + } + defer f.Close() + + var lines []string + scanner := bufio.NewScanner(f) + for scanner.Scan() { + lines = append(lines, scanner.Text()) + } + if err := scanner.Err(); err != nil { + return 0, err + } + + fixCount := 0 + + var headingLines []int + for i, line := range lines { + if sectionHeadingRe.MatchString(line) { + headingLines = append(headingLines, i) + } + } + + // Process each heading block independently to match linter sort scope. + for i, headingIdx := range headingLines { + start := headingIdx + 1 + end := len(lines) + if i+1 < len(headingLines) { + end = headingLines[i+1] + } + + var entryPositions []int + var entries []parser.Entry + for lineIdx := start; lineIdx < end; lineIdx++ { + entry, err := parser.ParseEntry(lines[lineIdx], lineIdx+1) + if err != nil { + continue + } + entryPositions = append(entryPositions, lineIdx) + entries = append(entries, entry) + } + if len(entries) == 0 { + continue + } + + var fixed []parser.Entry + for _, e := range entries { + f := FixEntry(e) + f.Description = RemoveAttribution(f.Description) + // Re-apply period after removing attribution (it may have been stripped) + if len(f.Description) > 0 && !strings.HasSuffix(f.Description, ".") { + f.Description += "." + } + fixed = append(fixed, f) + } + + sorted := SortEntries(fixed) + for j, e := range sorted { + newLine := FormatEntry(e) + lineIdx := entryPositions[j] + if lines[lineIdx] != newLine { + fixCount++ + lines[lineIdx] = newLine + } + } + } + + if fixCount == 0 { + return 0, nil + } + + // Write back + out, err := os.Create(path) + if err != nil { + return 0, err + } + defer out.Close() + + w := bufio.NewWriter(out) + for i, line := range lines { + if _, err := w.WriteString(line); err != nil { + return 0, err + } + if i < len(lines)-1 { + if _, err := w.WriteString("\n"); err != nil { + return 0, err + } + } + } + // Preserve trailing newline if original had one + if _, err := w.WriteString("\n"); err != nil { + return 0, err + } + return fixCount, w.Flush() +} + +// SortFile reads the README, sorts entries alphabetically within each section, +// and writes the result back. Unlike FixFile, it does not modify descriptions +// (no capitalization, period, or attribution changes). +func SortFile(path string) (int, error) { + f, err := os.Open(path) + if err != nil { + return 0, err + } + defer f.Close() + + var lines []string + scanner := bufio.NewScanner(f) + for scanner.Scan() { + lines = append(lines, scanner.Text()) + } + if err := scanner.Err(); err != nil { + return 0, err + } + + fixCount := 0 + + var headingLines []int + for i, line := range lines { + if sectionHeadingRe.MatchString(line) { + headingLines = append(headingLines, i) + } + } + + for i, headingIdx := range headingLines { + start := headingIdx + 1 + end := len(lines) + if i+1 < len(headingLines) { + end = headingLines[i+1] + } + + var entryPositions []int + var entries []parser.Entry + for lineIdx := start; lineIdx < end; lineIdx++ { + entry, err := parser.ParseEntry(lines[lineIdx], lineIdx+1) + if err != nil { + continue + } + entryPositions = append(entryPositions, lineIdx) + entries = append(entries, entry) + } + if len(entries) == 0 { + continue + } + + sorted := SortEntries(entries) + for j, e := range sorted { + lineIdx := entryPositions[j] + // Use the original Raw line from the sorted entry to preserve formatting + if lines[lineIdx] != e.Raw { + fixCount++ + lines[lineIdx] = e.Raw + } + } + } + + if fixCount == 0 { + return 0, nil + } + + out, err := os.Create(path) + if err != nil { + return 0, err + } + defer out.Close() + + w := bufio.NewWriter(out) + for i, line := range lines { + if _, err := w.WriteString(line); err != nil { + return 0, err + } + if i < len(lines)-1 { + if _, err := w.WriteString("\n"); err != nil { + return 0, err + } + } + } + if _, err := w.WriteString("\n"); err != nil { + return 0, err + } + return fixCount, w.Flush() +} diff --git a/internal/linter/fixer_test.go b/internal/linter/fixer_test.go new file mode 100644 index 000000000..756485aa8 --- /dev/null +++ b/internal/linter/fixer_test.go @@ -0,0 +1,281 @@ +package linter + +import ( + "os" + "strings" + "testing" + + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +func TestRemoveAttribution(t *testing.T) { + tests := []struct { + input string + want string + }{ + { + "Tool for managing containers by [@author](https://github.com/author)", + "Tool for managing containers", + }, + { + "Tool for managing containers by [@author][author]", + "Tool for managing containers", + }, + { + "Tool for managing containers by @author", + "Tool for managing containers", + }, + { + "Analyzes resource usage. Created by [@Google][google]", + "Analyzes resource usage.", + }, + { + "A tool by [@someone](https://example.com).", + "A tool", + }, + { + "step-by-step tutorial and more resources", + "step-by-step tutorial and more resources", + }, + { + "No attribution here", + "No attribution here", + }, + } + + for _, tt := range tests { + got := RemoveAttribution(tt.input) + if got != tt.want { + t.Errorf("RemoveAttribution(%q) = %q, want %q", tt.input, got, tt.want) + } + } +} + +func TestFormatEntry(t *testing.T) { + e := parser.Entry{ + Name: "Portainer", + URL: "https://github.com/portainer/portainer", + Description: "Management UI for Docker.", + } + got := FormatEntry(e) + want := "- [Portainer](https://github.com/portainer/portainer) - Management UI for Docker." + if got != want { + t.Errorf("FormatEntry = %q, want %q", got, want) + } +} + +func TestFormatEntryWithMarkers(t *testing.T) { + e := parser.Entry{ + Name: "OldTool", + URL: "https://github.com/old/tool", + Description: "A deprecated tool.", + Markers: []parser.Marker{parser.MarkerAbandoned}, + } + got := FormatEntry(e) + want := "- [OldTool](https://github.com/old/tool) - :skull: A deprecated tool." + if got != want { + t.Errorf("FormatEntry = %q, want %q", got, want) + } +} + +func TestFixFile(t *testing.T) { + content := `# Awesome Docker + +## Tools + +- [Zebra](https://example.com/zebra) - a tool by [@author](https://github.com/author) +- [Alpha](https://example.com/alpha) - another tool + +## Other + +Some text here. +` + tmp, err := os.CreateTemp("", "readme-*.md") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmp.Name()) + + if _, err := tmp.WriteString(content); err != nil { + t.Fatal(err) + } + tmp.Close() + + count, err := FixFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + + if count == 0 { + t.Fatal("expected fixes, got 0") + } + + data, err := os.ReadFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + result := string(data) + + // Check sorting: Alpha should come before Zebra + alphaIdx := strings.Index(result, "[Alpha]") + zebraIdx := strings.Index(result, "[Zebra]") + if alphaIdx > zebraIdx { + t.Error("expected Alpha before Zebra after sort") + } + + // Check capitalization + if !strings.Contains(result, "- A tool.") { + t.Errorf("expected capitalized description, got:\n%s", result) + } + + // Check attribution removed + if strings.Contains(result, "@author") { + t.Errorf("expected attribution removed, got:\n%s", result) + } + + // Check period added + if !strings.Contains(result, "Another tool.") { + t.Errorf("expected period added, got:\n%s", result) + } +} + +func TestSortFile(t *testing.T) { + content := `# Awesome Docker + +## Tools + +- [Zebra](https://example.com/zebra) - a tool by [@author](https://github.com/author) +- [Alpha](https://example.com/alpha) - another tool + +## Other + +Some text here. +` + tmp, err := os.CreateTemp("", "readme-sort-*.md") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmp.Name()) + + if _, err := tmp.WriteString(content); err != nil { + t.Fatal(err) + } + tmp.Close() + + count, err := SortFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + if count == 0 { + t.Fatal("expected fixes, got 0") + } + + data, err := os.ReadFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + result := string(data) + + // Check sorting: Alpha should come before Zebra + alphaIdx := strings.Index(result, "[Alpha]") + zebraIdx := strings.Index(result, "[Zebra]") + if alphaIdx > zebraIdx { + t.Error("expected Alpha before Zebra after sort") + } + + // SortFile must NOT capitalize descriptions + if strings.Contains(result, "- A tool") { + t.Errorf("SortFile should not capitalize descriptions, got:\n%s", result) + } + + // SortFile must NOT remove attribution + if !strings.Contains(result, "@author") { + t.Errorf("SortFile should preserve attribution, got:\n%s", result) + } + + // SortFile must NOT add periods + if strings.Contains(result, "another tool.") { + t.Errorf("SortFile should not add periods, got:\n%s", result) + } +} + +func TestSortFileIdempotent(t *testing.T) { + content := `# Awesome Docker + +## Tools + +- [Alpha](https://example.com/alpha) - A tool. +- [Bravo](https://example.com/bravo) - B tool. +` + tmp, err := os.CreateTemp("", "readme-sort-idem-*.md") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmp.Name()) + + if _, err := tmp.WriteString(content); err != nil { + t.Fatal(err) + } + tmp.Close() + + count, err := SortFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + if count != 0 { + t.Fatalf("expected no changes on already-sorted file, got %d", count) + } +} + +func TestFixFileSortsAcrossBlankLinesAndIsIdempotent(t *testing.T) { + content := `# Awesome Docker + +## Tools + +- [Zulu](https://example.com/zulu) - z tool + +- [Alpha](https://example.com/alpha) - a tool +` + + tmp, err := os.CreateTemp("", "readme-*.md") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmp.Name()) + + if _, err := tmp.WriteString(content); err != nil { + t.Fatal(err) + } + tmp.Close() + + firstCount, err := FixFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + if firstCount == 0 { + t.Fatal("expected first run to apply fixes") + } + + firstData, err := os.ReadFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + firstResult := string(firstData) + + alphaIdx := strings.Index(firstResult, "[Alpha]") + zuluIdx := strings.Index(firstResult, "[Zulu]") + if alphaIdx == -1 || zuluIdx == -1 { + t.Fatalf("expected both Alpha and Zulu in result:\n%s", firstResult) + } + if alphaIdx > zuluIdx { + t.Fatalf("expected Alpha before Zulu after fix:\n%s", firstResult) + } + + secondCount, err := FixFile(tmp.Name()) + if err != nil { + t.Fatal(err) + } + if secondCount != 0 { + t.Fatalf("expected second run to be idempotent, got %d changes", secondCount) + } +} diff --git a/internal/linter/linter.go b/internal/linter/linter.go new file mode 100644 index 000000000..4183b11df --- /dev/null +++ b/internal/linter/linter.go @@ -0,0 +1,60 @@ +package linter + +import ( + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +// Result holds all lint issues found. +type Result struct { + Issues []Issue + Errors int + Warnings int +} + +// Lint checks an entire parsed document for issues. +func Lint(doc parser.Document) Result { + var result Result + + // Collect all entries for duplicate checking + allEntries := collectEntries(doc.Sections) + for _, issue := range CheckDuplicates(allEntries) { + addIssue(&result, issue) + } + + // Check each section + lintSections(doc.Sections, &result) + + return result +} + +func lintSections(sections []parser.Section, result *Result) { + for _, s := range sections { + for _, e := range s.Entries { + for _, issue := range CheckEntry(e) { + addIssue(result, issue) + } + } + for _, issue := range CheckSorted(s.Entries) { + addIssue(result, issue) + } + lintSections(s.Children, result) + } +} + +func collectEntries(sections []parser.Section) []parser.Entry { + var all []parser.Entry + for _, s := range sections { + all = append(all, s.Entries...) + all = append(all, collectEntries(s.Children)...) + } + return all +} + +func addIssue(result *Result, issue Issue) { + result.Issues = append(result.Issues, issue) + if issue.Severity == SeverityError { + result.Errors++ + } else { + result.Warnings++ + } +} diff --git a/internal/linter/linter_test.go b/internal/linter/linter_test.go new file mode 100644 index 000000000..bd4fd5e8d --- /dev/null +++ b/internal/linter/linter_test.go @@ -0,0 +1,111 @@ +package linter + +import ( + "testing" + + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +func TestRuleDescriptionCapital(t *testing.T) { + entry := parser.Entry{Name: "Test", URL: "https://example.com", Description: "lowercase start.", Line: 10} + issues := CheckEntry(entry) + found := false + for _, issue := range issues { + if issue.Rule == RuleDescriptionCapital { + found = true + } + } + if !found { + t.Error("expected RuleDescriptionCapital issue for lowercase description") + } +} + +func TestRuleDescriptionPeriod(t *testing.T) { + entry := parser.Entry{Name: "Test", URL: "https://example.com", Description: "No period at end", Line: 10} + issues := CheckEntry(entry) + found := false + for _, issue := range issues { + if issue.Rule == RuleDescriptionPeriod { + found = true + } + } + if !found { + t.Error("expected RuleDescriptionPeriod issue") + } +} + +func TestRuleSorted(t *testing.T) { + entries := []parser.Entry{ + {Name: "Zebra", URL: "https://z.com", Description: "Z.", Line: 1}, + {Name: "Alpha", URL: "https://a.com", Description: "A.", Line: 2}, + } + issues := CheckSorted(entries) + if len(issues) == 0 { + t.Error("expected sorting issue") + } +} + +func TestRuleSortedOK(t *testing.T) { + entries := []parser.Entry{ + {Name: "Alpha", URL: "https://a.com", Description: "A.", Line: 1}, + {Name: "Zebra", URL: "https://z.com", Description: "Z.", Line: 2}, + } + issues := CheckSorted(entries) + if len(issues) != 0 { + t.Errorf("expected no sorting issues, got %d", len(issues)) + } +} + +func TestRuleDuplicateURL(t *testing.T) { + entries := []parser.Entry{ + {Name: "A", URL: "https://example.com/a", Description: "A.", Line: 1}, + {Name: "B", URL: "https://example.com/a", Description: "B.", Line: 5}, + } + issues := CheckDuplicates(entries) + if len(issues) == 0 { + t.Error("expected duplicate URL issue") + } +} + +func TestValidEntry(t *testing.T) { + entry := parser.Entry{Name: "Good", URL: "https://example.com", Description: "A good project.", Line: 10} + issues := CheckEntry(entry) + if len(issues) != 0 { + t.Errorf("expected no issues, got %v", issues) + } +} + +func TestFixDescriptionCapital(t *testing.T) { + entry := parser.Entry{Name: "Test", URL: "https://example.com", Description: "lowercase.", Line: 10} + fixed := FixEntry(entry) + if fixed.Description != "Lowercase." { + t.Errorf("description = %q, want %q", fixed.Description, "Lowercase.") + } +} + +func TestFixDescriptionPeriod(t *testing.T) { + entry := parser.Entry{Name: "Test", URL: "https://example.com", Description: "No period", Line: 10} + fixed := FixEntry(entry) + if fixed.Description != "No period." { + t.Errorf("description = %q, want %q", fixed.Description, "No period.") + } +} + +func TestLintDocument(t *testing.T) { + doc := parser.Document{ + Sections: []parser.Section{ + { + Title: "Tools", + Level: 2, + Entries: []parser.Entry{ + {Name: "Zebra", URL: "https://z.com", Description: "Z tool.", Line: 1}, + {Name: "Alpha", URL: "https://a.com", Description: "a tool", Line: 2}, + }, + }, + }, + } + result := Lint(doc) + if result.Errors == 0 { + t.Error("expected errors (unsorted, lowercase, no period)") + } +} diff --git a/internal/linter/rules.go b/internal/linter/rules.go new file mode 100644 index 000000000..13d41db74 --- /dev/null +++ b/internal/linter/rules.go @@ -0,0 +1,153 @@ +package linter + +import ( + "fmt" + "sort" + "strings" + "unicode" + + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +// Rule identifies a linting rule. +type Rule string + +const ( + RuleDescriptionCapital Rule = "description-capital" + RuleDescriptionPeriod Rule = "description-period" + RuleSorted Rule = "sorted" + RuleDuplicateURL Rule = "duplicate-url" +) + +// Severity of a lint issue. +type Severity int + +const ( + SeverityError Severity = iota + SeverityWarning +) + +// Issue is a single lint problem found. +type Issue struct { + Rule Rule + Message string + Severity Severity + Line int +} + +func (i Issue) String() string { + sev := "ERROR" + if i.Severity == SeverityWarning { + sev = "WARN" + } + return fmt.Sprintf("[%s] line %d: %s (%s)", sev, i.Line, i.Message, i.Rule) +} + +// CheckEntry validates a single entry against formatting rules. +func CheckEntry(e parser.Entry) []Issue { + var issues []Issue + + if first, ok := firstLetter(e.Description); ok && !unicode.IsUpper(first) { + issues = append(issues, Issue{ + Rule: RuleDescriptionCapital, + Severity: SeverityError, + Line: e.Line, + Message: fmt.Sprintf("%q: description should start with a capital letter", e.Name), + }) + } + + if len(e.Description) > 0 && !strings.HasSuffix(e.Description, ".") { + issues = append(issues, Issue{ + Rule: RuleDescriptionPeriod, + Severity: SeverityError, + Line: e.Line, + Message: fmt.Sprintf("%q: description should end with a period", e.Name), + }) + } + + return issues +} + +// CheckSorted verifies entries are in alphabetical order (case-insensitive). +func CheckSorted(entries []parser.Entry) []Issue { + var issues []Issue + for i := 1; i < len(entries); i++ { + prev := strings.ToLower(entries[i-1].Name) + curr := strings.ToLower(entries[i].Name) + if prev > curr { + issues = append(issues, Issue{ + Rule: RuleSorted, + Severity: SeverityError, + Line: entries[i].Line, + Message: fmt.Sprintf( + "%q should come before %q (alphabetical order)", + entries[i].Name, + entries[i-1].Name, + ), + }) + } + } + return issues +} + +// CheckDuplicates finds entries with the same URL across the entire document. +func CheckDuplicates(entries []parser.Entry) []Issue { + var issues []Issue + seen := make(map[string]int) // URL -> first line number + for _, e := range entries { + url := strings.TrimRight(e.URL, "/") + if firstLine, exists := seen[url]; exists { + issues = append(issues, Issue{ + Rule: RuleDuplicateURL, + Severity: SeverityError, + Line: e.Line, + Message: fmt.Sprintf("duplicate URL %q (first seen at line %d)", e.URL, firstLine), + }) + } else { + seen[url] = e.Line + } + } + return issues +} + +// firstLetter returns the first unicode letter in s and true, or zero and false if none. +func firstLetter(s string) (rune, bool) { + for _, r := range s { + if unicode.IsLetter(r) { + return r, true + } + } + return 0, false +} + +// FixEntry returns a copy of the entry with auto-fixable issues corrected. +func FixEntry(e parser.Entry) parser.Entry { + fixed := e + if len(fixed.Description) > 0 { + // Capitalize first letter (find it, may not be at index 0) + runes := []rune(fixed.Description) + for i, r := range runes { + if unicode.IsLetter(r) { + runes[i] = unicode.ToUpper(r) + break + } + } + fixed.Description = string(runes) + + // Ensure period at end + if !strings.HasSuffix(fixed.Description, ".") { + fixed.Description += "." + } + } + return fixed +} + +// SortEntries returns a sorted copy of entries (case-insensitive by Name). +func SortEntries(entries []parser.Entry) []parser.Entry { + sorted := make([]parser.Entry, len(entries)) + copy(sorted, entries) + sort.Slice(sorted, func(i, j int) bool { + return strings.ToLower(sorted[i].Name) < strings.ToLower(sorted[j].Name) + }) + return sorted +} diff --git a/internal/parser/parser.go b/internal/parser/parser.go new file mode 100644 index 000000000..7c6f00af8 --- /dev/null +++ b/internal/parser/parser.go @@ -0,0 +1,140 @@ +package parser + +import ( + "bufio" + "fmt" + "io" + "regexp" + "strings" +) + +// entryRe matches: - [Name](URL) - Description +// Also handles optional markers/text between URL and " - " separator, e.g.: +// +// - [Name](URL) :skull: - Description +// - [Name](URL) (2) :skull: - Description +var entryRe = regexp.MustCompile(`^[-*]\s+\[([^\]]+)\]\(([^)]+)\)(.*?)\s+-\s+(.+)$`) + +// headingRe matches markdown headings: # Title, ## Title, etc. +var headingRe = regexp.MustCompile(`^(#{1,6})\s+(.+?)(?:\s*)?$`) + +var markerDefs = []struct { + text string + marker Marker +}{ + {text: ":skull:", marker: MarkerAbandoned}, + {text: ":yen:", marker: MarkerPaid}, + {text: ":construction:", marker: MarkerWIP}, + {text: ":ice_cube:", marker: MarkerStale}, +} + +// ParseEntry parses a single markdown list line into an Entry. +func ParseEntry(line string, lineNum int) (Entry, error) { + m := entryRe.FindStringSubmatch(strings.TrimSpace(line)) + if m == nil { + return Entry{}, fmt.Errorf("line %d: not a valid entry: %q", lineNum, line) + } + + middle := m[3] // text between URL closing paren and " - " + desc := m[4] + var markers []Marker + + // Extract markers from both the middle section and the description + for _, def := range markerDefs { + if strings.Contains(middle, def.text) || strings.Contains(desc, def.text) { + markers = append(markers, def.marker) + middle = strings.ReplaceAll(middle, def.text, "") + desc = strings.ReplaceAll(desc, def.text, "") + } + } + desc = strings.TrimSpace(desc) + + return Entry{ + Name: m[1], + URL: m[2], + Description: desc, + Markers: markers, + Line: lineNum, + Raw: line, + }, nil +} + +// Parse reads a full README and returns a Document. +func Parse(r io.Reader) (Document, error) { + scanner := bufio.NewScanner(r) + var doc Document + var allSections []struct { + section Section + level int + } + + lineNum := 0 + for scanner.Scan() { + lineNum++ + line := scanner.Text() + + // Check for heading + if hm := headingRe.FindStringSubmatch(line); hm != nil { + level := len(hm[1]) + title := strings.TrimSpace(hm[2]) + allSections = append(allSections, struct { + section Section + level int + }{ + section: Section{Title: title, Level: level, Line: lineNum}, + level: level, + }) + continue + } + + // Check for entry (list item with link) + if entry, err := ParseEntry(line, lineNum); err == nil { + if len(allSections) > 0 { + allSections[len(allSections)-1].section.Entries = append( + allSections[len(allSections)-1].section.Entries, entry) + } + continue + } + + // Everything else: preamble if no sections yet + if len(allSections) == 0 { + doc.Preamble = append(doc.Preamble, line) + } + } + + if err := scanner.Err(); err != nil { + return doc, err + } + + // Build section tree by nesting based on heading level + doc.Sections = buildTree(allSections) + return doc, nil +} + +func buildTree(flat []struct { + section Section + level int +}, +) []Section { + if len(flat) == 0 { + return nil + } + + var result []Section + for i := 0; i < len(flat); i++ { + current := flat[i].section + currentLevel := flat[i].level + + // Collect children: everything after this heading at a deeper level + j := i + 1 + for j < len(flat) && flat[j].level > currentLevel { + j++ + } + if j > i+1 { + current.Children = buildTree(flat[i+1 : j]) + } + result = append(result, current) + i = j - 1 + } + return result +} diff --git a/internal/parser/parser_test.go b/internal/parser/parser_test.go new file mode 100644 index 000000000..f5d19cdd0 --- /dev/null +++ b/internal/parser/parser_test.go @@ -0,0 +1,165 @@ +package parser + +import ( + "os" + "strings" + "testing" +) + +func TestParseEntry(t *testing.T) { + line := `- [Docker Desktop](https://www.docker.com/products/docker-desktop/) - Official native app. Only for Windows and MacOS.` + entry, err := ParseEntry(line, 1) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if entry.Name != "Docker Desktop" { + t.Errorf("name = %q, want %q", entry.Name, "Docker Desktop") + } + if entry.URL != "https://www.docker.com/products/docker-desktop/" { + t.Errorf("url = %q, want %q", entry.URL, "https://www.docker.com/products/docker-desktop/") + } + if entry.Description != "Official native app. Only for Windows and MacOS." { + t.Errorf( + "description = %q, want %q", + entry.Description, + "Official native app. Only for Windows and MacOS.", + ) + } + if len(entry.Markers) != 0 { + t.Errorf("markers = %v, want empty", entry.Markers) + } +} + +func TestParseEntryWithMarkers(t *testing.T) { + line := `- [Docker Swarm](https://github.com/docker/swarm) - Swarm clustering system. :skull:` + entry, err := ParseEntry(line, 1) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if entry.Name != "Docker Swarm" { + t.Errorf("name = %q, want %q", entry.Name, "Docker Swarm") + } + if len(entry.Markers) != 1 || entry.Markers[0] != MarkerAbandoned { + t.Errorf("markers = %v, want [MarkerAbandoned]", entry.Markers) + } + if strings.Contains(entry.Description, ":skull:") { + t.Errorf("description should not contain marker text, got %q", entry.Description) + } +} + +func TestParseEntryMultipleMarkers(t *testing.T) { + line := `- [SomeProject](https://example.com) - A project. :yen: :construction:` + entry, err := ParseEntry(line, 1) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(entry.Markers) != 2 { + t.Fatalf("markers count = %d, want 2", len(entry.Markers)) + } +} + +func TestParseEntryMarkersCanonicalOrder(t *testing.T) { + line := `- [SomeProject](https://example.com) - :construction: A project. :skull:` + entry, err := ParseEntry(line, 1) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(entry.Markers) != 2 { + t.Fatalf("markers count = %d, want 2", len(entry.Markers)) + } + if entry.Markers[0] != MarkerAbandoned || entry.Markers[1] != MarkerWIP { + t.Fatalf("marker order = %v, want [MarkerAbandoned MarkerWIP]", entry.Markers) + } +} + +func TestParseDocument(t *testing.T) { + input := `# Awesome Docker + +> A curated list + +# Contents + +- [Projects](#projects) + +# Legend + +- Abandoned :skull: + +# Projects + +## Tools + +- [ToolA](https://github.com/a/a) - Does A. +- [ToolB](https://github.com/b/b) - Does B. :skull: + +## Services + +- [ServiceC](https://example.com/c) - Does C. :yen: +` + doc, err := Parse(strings.NewReader(input)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(doc.Sections) == 0 { + t.Fatal("expected at least one section") + } + // Find the "Projects" section + var projects *Section + for i := range doc.Sections { + if doc.Sections[i].Title == "Projects" { + projects = &doc.Sections[i] + break + } + } + if projects == nil { + t.Fatal("expected a Projects section") + } + if len(projects.Children) != 2 { + t.Errorf("projects children = %d, want 2", len(projects.Children)) + } + if projects.Children[0].Title != "Tools" { + t.Errorf("first child = %q, want %q", projects.Children[0].Title, "Tools") + } + if len(projects.Children[0].Entries) != 2 { + t.Errorf("Tools entries = %d, want 2", len(projects.Children[0].Entries)) + } +} + +func TestParseNotAnEntry(t *testing.T) { + _, err := ParseEntry("- Abandoned :skull:", 1) + if err == nil { + t.Error("expected error for non-entry list item") + } +} + +func TestParseRealREADME(t *testing.T) { + f, err := os.Open("../../README.md") + if err != nil { + t.Skip("README.md not found, skipping integration test") + } + defer f.Close() + + doc, err := Parse(f) + if err != nil { + t.Fatalf("failed to parse README: %v", err) + } + + if len(doc.Sections) == 0 { + t.Error("expected sections") + } + + total := countEntries(doc.Sections) + if total < 100 { + t.Errorf("expected at least 100 entries, got %d", total) + } + t.Logf("Parsed %d sections, %d total entries", len(doc.Sections), total) +} + +func countEntries(sections []Section) int { + n := 0 + for _, s := range sections { + n += len(s.Entries) + n += countEntries(s.Children) + } + return n +} diff --git a/internal/parser/types.go b/internal/parser/types.go new file mode 100644 index 000000000..438136fdb --- /dev/null +++ b/internal/parser/types.go @@ -0,0 +1,36 @@ +package parser + +// Marker represents a status emoji on an entry. +type Marker int + +const ( + MarkerAbandoned Marker = iota // :skull: + MarkerPaid // :yen: + MarkerWIP // :construction: + MarkerStale // :ice_cube: +) + +// Entry is a single link entry in the README. +type Entry struct { + Name string + URL string + Description string + Raw string + Markers []Marker + Line int +} + +// Section is a heading with optional entries and child sections. +type Section struct { + Title string + Entries []Entry + Children []Section + Level int + Line int +} + +// Document is the parsed representation of the full README. +type Document struct { + Preamble []string // lines before the first section + Sections []Section +} diff --git a/internal/pruner/pruner.go b/internal/pruner/pruner.go new file mode 100644 index 000000000..7a6bfe824 --- /dev/null +++ b/internal/pruner/pruner.go @@ -0,0 +1,221 @@ +// Package pruner owns the removal of README entries by health status. +// +// Why it exists: maintenance regularly produces a list of archived/stale +// projects (see scorer + cache). Pruner is the seam that translates that list +// into a concrete edit of README.md and config/health_cache.yaml, so the README +// stays in lockstep with the cache instead of drifting via ad-hoc edits. +package pruner + +import ( + "bufio" + "fmt" + "io" + "os" + "regexp" + "sort" + "strings" + + "github.com/veggiemonk/awesome-docker/internal/cache" + "github.com/veggiemonk/awesome-docker/internal/parser" +) + +// Removed describes a single entry removed from the README. +type Removed struct { + URL string + Name string + Status string + Line int +} + +// Result summarizes a prune run. +type Result struct { + Removed []Removed + // URLs in the target set that didn't appear in the README (already gone, + // non-GitHub indirection, or URL drift between cache and README). + NotFound []string +} + +// TargetURLs returns the URL set selected by the given statuses from the cache. +func TargetURLs(hc *cache.HealthCache, statuses []string) map[string]cache.HealthEntry { + want := make(map[string]bool, len(statuses)) + for _, s := range statuses { + want[strings.TrimSpace(strings.ToLower(s))] = true + } + out := make(map[string]cache.HealthEntry) + for i := range hc.Entries { + e := &hc.Entries[i] + if want[strings.ToLower(e.Status)] { + out[normalizeURL(e.URL)] = *e + } + } + return out +} + +// PruneREADME removes lines whose entry URL is in targets and writes the +// result back to path. If dryRun is true, the file is not modified. +func PruneREADME(path string, targets map[string]cache.HealthEntry, dryRun bool) (Result, error) { + f, err := os.Open(path) //nolint:gosec + if err != nil { + return Result{}, fmt.Errorf("open %s: %w", path, err) + } + lines, err := readLines(f) + f.Close() + if err != nil { + return Result{}, fmt.Errorf("read %s: %w", path, err) + } + + var ( + kept = make([]string, 0, len(lines)) + removed []Removed + hit = make(map[string]bool, len(targets)) + ) + + for i, line := range lines { + entry, perr := parser.ParseEntry(line, i+1) + if perr != nil { + kept = append(kept, line) + continue + } + key := normalizeURL(entry.URL) + meta, ok := targets[key] + if !ok { + kept = append(kept, line) + continue + } + hit[key] = true + removed = append(removed, Removed{ + URL: entry.URL, + Name: entry.Name, + Status: meta.Status, + Line: i + 1, + }) + } + + res := Result{Removed: removed} + for k := range targets { + if !hit[k] { + res.NotFound = append(res.NotFound, targets[k].URL) + } + } + sort.Strings(res.NotFound) + + if dryRun || len(removed) == 0 { + return res, nil + } + + if err := writeLines(path, kept); err != nil { + return res, fmt.Errorf("write %s: %w", path, err) + } + return res, nil +} + +// PruneCache drops entries whose normalized URL is in targets and writes the +// cache back to path. Safe to call when len(targets) == 0 (no-op). +func PruneCache(path string, hc *cache.HealthCache, targets map[string]cache.HealthEntry, dryRun bool) (int, error) { + if len(targets) == 0 { + return 0, nil + } + kept := hc.Entries[:0] + for i := range hc.Entries { + e := &hc.Entries[i] + if _, drop := targets[normalizeURL(e.URL)]; drop { + continue + } + kept = append(kept, *e) + } + dropped := len(hc.Entries) - len(kept) + hc.Entries = kept + if dryRun || dropped == 0 { + return dropped, nil + } + if err := cache.SaveHealthCache(path, hc); err != nil { + return dropped, err + } + return dropped, nil +} + +// reportSectionRe matches markdown health-report section headings: +// +// ## Archived (should mark :skull:) +// ## Stale (2+ years inactive) +// ## Inactive (1-2 years) +var reportSectionRe = regexp.MustCompile(`(?i)^##\s+(archived|stale|inactive|dead|healthy)\b`) + +// reportEntryRe matches: "- [name](url) - Stars: N - Last push: YYYY-MM-DD" +var reportEntryRe = regexp.MustCompile(`^-\s+\[([^\]]+)\]\((https?://[^)]+)\)`) + +// TargetsFromReport parses a markdown health report (same format as the +// `report` subcommand emits) and returns the URL set whose section heading +// matches one of the given statuses. +func TargetsFromReport(r io.Reader, statuses []string) (map[string]cache.HealthEntry, error) { + want := make(map[string]bool, len(statuses)) + for _, s := range statuses { + want[strings.TrimSpace(strings.ToLower(s))] = true + } + out := make(map[string]cache.HealthEntry) + sc := bufio.NewScanner(r) + sc.Buffer(make([]byte, 0, 64*1024), 1024*1024) + var current string + for sc.Scan() { + line := sc.Text() + if m := reportSectionRe.FindStringSubmatch(line); m != nil { + current = strings.ToLower(m[1]) + continue + } + if !want[current] { + continue + } + if m := reportEntryRe.FindStringSubmatch(line); m != nil { + url := strings.TrimSpace(m[2]) + out[normalizeURL(url)] = cache.HealthEntry{ + URL: url, + Name: m[1], + Status: current, + } + } + } + if err := sc.Err(); err != nil { + return nil, err + } + return out, nil +} + +func normalizeURL(u string) string { + u = strings.TrimSpace(u) + u = strings.TrimSuffix(u, "/") + u = strings.ToLower(u) + return u +} + +func readLines(r *os.File) ([]string, error) { + var lines []string + sc := bufio.NewScanner(r) + sc.Buffer(make([]byte, 0, 64*1024), 1024*1024) + for sc.Scan() { + lines = append(lines, sc.Text()) + } + return lines, sc.Err() +} + +func writeLines(path string, lines []string) error { + out, err := os.Create(path) //nolint:gosec + if err != nil { + return err + } + defer out.Close() + w := bufio.NewWriter(out) + for i, line := range lines { + if _, err := w.WriteString(line); err != nil { + return err + } + if i < len(lines)-1 { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return w.Flush() +} diff --git a/internal/pruner/pruner_test.go b/internal/pruner/pruner_test.go new file mode 100644 index 000000000..703525041 --- /dev/null +++ b/internal/pruner/pruner_test.go @@ -0,0 +1,173 @@ +package pruner + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +func TestTargetURLs(t *testing.T) { + hc := &cache.HealthCache{Entries: []cache.HealthEntry{ + {URL: "https://github.com/A/x", Status: "archived"}, + {URL: "https://github.com/B/y", Status: "stale"}, + {URL: "https://github.com/C/z", Status: "healthy"}, + {URL: "https://github.com/D/w", Status: "inactive"}, + }} + got := TargetURLs(hc, []string{"archived", "stale"}) + if len(got) != 2 { + t.Fatalf("want 2 targets, got %d", len(got)) + } + if _, ok := got["https://github.com/a/x"]; !ok { + t.Errorf("expected lowercased URL key for archived entry") + } +} + +func TestTargetsFromReport(t *testing.T) { + r := strings.NewReader(`# Health Report + +## Summary + +- Stale (2+ years): 2 + +## Archived (should mark :skull:) + +- [a/keep](https://github.com/A/Keep) - Stars: 1 - Last push: 2024-01-01 + +## Stale (2+ years inactive) + +- [b/drop](https://github.com/b/drop) - Stars: 2 - Last push: 2020-01-01 + +## Inactive (1-2 years) + +- [c/skip](https://github.com/c/skip) - Stars: 3 - Last push: 2025-01-01 +`) + targets, err := TargetsFromReport(r, []string{"archived", "stale"}) + if err != nil { + t.Fatal(err) + } + if len(targets) != 2 { + t.Fatalf("want 2, got %d: %v", len(targets), targets) + } + if _, ok := targets["https://github.com/a/keep"]; !ok { + t.Errorf("missing archived entry (case-insensitive)") + } + if _, ok := targets["https://github.com/b/drop"]; !ok { + t.Errorf("missing stale entry") + } + if _, ok := targets["https://github.com/c/skip"]; ok { + t.Errorf("inactive entry should not have been picked up") + } +} + +func TestPruneREADME(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "README.md") + content := `# Header + +## Tools + +- [keep](https://github.com/keep/me) - Healthy project. +- [drop](https://github.com/drop/me) - Stale project. +- [also-keep](https://github.com/also/keep) - Another one. +` + if err := os.WriteFile(path, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + + targets := map[string]cache.HealthEntry{ + "https://github.com/drop/me": {URL: "https://github.com/drop/me", Status: "stale"}, + } + res, err := PruneREADME(path, targets, false) + if err != nil { + t.Fatal(err) + } + if len(res.Removed) != 1 { + t.Fatalf("want 1 removed, got %d", len(res.Removed)) + } + if res.Removed[0].URL != "https://github.com/drop/me" { + t.Errorf("unexpected removed URL: %s", res.Removed[0].URL) + } + + out, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if strings.Contains(string(out), "drop/me") { + t.Errorf("expected drop/me to be removed from README, got:\n%s", out) + } + if !strings.Contains(string(out), "keep/me") || !strings.Contains(string(out), "also/keep") { + t.Errorf("expected other entries to be preserved, got:\n%s", out) + } +} + +func TestPruneREADMEDryRun(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "README.md") + content := "## X\n\n- [drop](https://github.com/drop/me) - Stale.\n" + if err := os.WriteFile(path, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + targets := map[string]cache.HealthEntry{ + "https://github.com/drop/me": {URL: "https://github.com/drop/me", Status: "stale"}, + } + res, err := PruneREADME(path, targets, true) + if err != nil { + t.Fatal(err) + } + if len(res.Removed) != 1 { + t.Fatalf("want 1 removed (preview), got %d", len(res.Removed)) + } + got, _ := os.ReadFile(path) + if string(got) != content { + t.Errorf("dry-run modified file: %q", got) + } +} + +func TestPruneREADMENotFound(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "README.md") + if err := os.WriteFile(path, []byte("## X\n\n- [k](https://github.com/k/v) - Keep.\n"), 0o644); err != nil { + t.Fatal(err) + } + targets := map[string]cache.HealthEntry{ + "https://github.com/gone/missing": {URL: "https://github.com/gone/missing", Status: "stale"}, + } + res, err := PruneREADME(path, targets, false) + if err != nil { + t.Fatal(err) + } + if len(res.Removed) != 0 { + t.Errorf("want 0 removed, got %d", len(res.Removed)) + } + if len(res.NotFound) != 1 || res.NotFound[0] != "https://github.com/gone/missing" { + t.Errorf("want gone/missing in NotFound, got %v", res.NotFound) + } +} + +func TestPruneCache(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "cache.yaml") + hc := &cache.HealthCache{Entries: []cache.HealthEntry{ + {URL: "https://github.com/a/keep", Status: "healthy"}, + {URL: "https://github.com/b/drop", Status: "stale"}, + }} + if err := cache.SaveHealthCache(path, hc); err != nil { + t.Fatal(err) + } + targets := map[string]cache.HealthEntry{ + "https://github.com/b/drop": {URL: "https://github.com/b/drop", Status: "stale"}, + } + n, err := PruneCache(path, hc, targets, false) + if err != nil { + t.Fatal(err) + } + if n != 1 { + t.Errorf("want 1 dropped, got %d", n) + } + if len(hc.Entries) != 1 || hc.Entries[0].URL != "https://github.com/a/keep" { + t.Errorf("unexpected remaining entries: %v", hc.Entries) + } +} diff --git a/internal/scorer/scorer.go b/internal/scorer/scorer.go new file mode 100644 index 000000000..d9e60887e --- /dev/null +++ b/internal/scorer/scorer.go @@ -0,0 +1,181 @@ +package scorer + +import ( + "encoding/json" + "fmt" + "strings" + "time" + + "github.com/veggiemonk/awesome-docker/internal/cache" + "github.com/veggiemonk/awesome-docker/internal/checker" +) + +// Status represents the health status of an entry. +type Status string + +const ( + StatusHealthy Status = "healthy" + StatusInactive Status = "inactive" // 1-2 years since last push + StatusStale Status = "stale" // 2+ years since last push + StatusArchived Status = "archived" + StatusDead Status = "dead" // disabled or 404 +) + +// ScoredEntry is a repo with its computed health status. +type ScoredEntry struct { + LastPush time.Time + URL string + Name string + Status Status + Category string + Description string + Stars int + Forks int + HasLicense bool +} + +// ReportSummary contains grouped status counts. +type ReportSummary struct { + Healthy int `json:"healthy"` + Inactive int `json:"inactive"` + Stale int `json:"stale"` + Archived int `json:"archived"` + Dead int `json:"dead"` +} + +// ReportData is the full machine-readable report model. +type ReportData struct { + GeneratedAt time.Time `json:"generated_at"` + ByStatus map[Status][]ScoredEntry `json:"by_status"` + Entries []ScoredEntry `json:"entries"` + Summary ReportSummary `json:"summary"` + Total int `json:"total"` +} + +// Score computes the health status of a GitHub repo. +func Score(info checker.RepoInfo) Status { + if info.IsDisabled { + return StatusDead + } + if info.IsArchived { + return StatusArchived + } + + twoYearsAgo := time.Now().AddDate(-2, 0, 0) + oneYearAgo := time.Now().AddDate(-1, 0, 0) + + if info.PushedAt.Before(twoYearsAgo) { + return StatusStale + } + if info.PushedAt.Before(oneYearAgo) { + return StatusInactive + } + return StatusHealthy +} + +// ScoreAll scores a batch of repo infos. +func ScoreAll(infos []checker.RepoInfo) []ScoredEntry { + results := make([]ScoredEntry, len(infos)) + for i, info := range infos { + results[i] = ScoredEntry{ + URL: info.URL, + Name: fmt.Sprintf("%s/%s", info.Owner, info.Name), + Status: Score(info), + Stars: info.Stars, + Forks: info.Forks, + HasLicense: info.HasLicense, + LastPush: info.PushedAt, + } + } + return results +} + +// ToCacheEntries converts scored entries to cache format. +func ToCacheEntries(scored []ScoredEntry) []cache.HealthEntry { + entries := make([]cache.HealthEntry, len(scored)) + now := time.Now().UTC() + for i := range scored { + s := &scored[i] + entries[i] = cache.HealthEntry{ + URL: s.URL, + Name: s.Name, + Status: string(s.Status), + Stars: s.Stars, + Forks: s.Forks, + HasLicense: s.HasLicense, + LastPush: s.LastPush, + CheckedAt: now, + Category: s.Category, + Description: s.Description, + } + } + return entries +} + +// GenerateReport produces a Markdown health report. +func GenerateReport(scored []ScoredEntry) string { + var b strings.Builder + + data := BuildReportData(scored) + groups := data.ByStatus + + fmt.Fprintf(&b, "# Health Report\n\n") + fmt.Fprintf(&b, "**Generated:** %s\n\n", data.GeneratedAt.Format(time.RFC3339)) + fmt.Fprintf(&b, "**Total:** %d repositories\n\n", data.Total) + + fmt.Fprintf(&b, "## Summary\n\n") + fmt.Fprintf(&b, "- Healthy: %d\n", data.Summary.Healthy) + fmt.Fprintf(&b, "- Inactive (1-2 years): %d\n", data.Summary.Inactive) + fmt.Fprintf(&b, "- Stale (2+ years): %d\n", data.Summary.Stale) + fmt.Fprintf(&b, "- Archived: %d\n", data.Summary.Archived) + fmt.Fprintf(&b, "- Dead: %d\n\n", data.Summary.Dead) + + writeSection := func(title string, status Status) { + entries := groups[status] + if len(entries) == 0 { + return + } + fmt.Fprintf(&b, "## %s\n\n", title) + for i := range entries { + e := &entries[i] + fmt.Fprintf(&b, "- [%s](%s) - Stars: %d - Last push: %s\n", + e.Name, e.URL, e.Stars, e.LastPush.Format("2006-01-02")) + } + b.WriteString("\n") + } + + writeSection("Archived (should mark :skull:)", StatusArchived) + writeSection("Stale (2+ years inactive)", StatusStale) + writeSection("Inactive (1-2 years)", StatusInactive) + + return b.String() +} + +// BuildReportData returns full report data for machine-readable and markdown rendering. +func BuildReportData(scored []ScoredEntry) ReportData { + groups := map[Status][]ScoredEntry{} + for i := range scored { + s := &scored[i] + groups[s.Status] = append(groups[s.Status], *s) + } + + return ReportData{ + GeneratedAt: time.Now().UTC(), + Total: len(scored), + Summary: ReportSummary{ + Healthy: len(groups[StatusHealthy]), + Inactive: len(groups[StatusInactive]), + Stale: len(groups[StatusStale]), + Archived: len(groups[StatusArchived]), + Dead: len(groups[StatusDead]), + }, + Entries: scored, + ByStatus: groups, + } +} + +// GenerateJSONReport returns the full report as pretty-printed JSON. +func GenerateJSONReport(scored []ScoredEntry) ([]byte, error) { + data := BuildReportData(scored) + return json.MarshalIndent(data, "", " ") +} diff --git a/internal/scorer/scorer_test.go b/internal/scorer/scorer_test.go new file mode 100644 index 000000000..89a96ec8e --- /dev/null +++ b/internal/scorer/scorer_test.go @@ -0,0 +1,171 @@ +package scorer + +import ( + "encoding/json" + "fmt" + "strings" + "testing" + "time" + + "github.com/veggiemonk/awesome-docker/internal/checker" +) + +func TestScoreHealthy(t *testing.T) { + info := checker.RepoInfo{ + PushedAt: time.Now().AddDate(0, -3, 0), + IsArchived: false, + Stars: 100, + HasLicense: true, + } + status := Score(info) + if status != StatusHealthy { + t.Errorf("status = %q, want %q", status, StatusHealthy) + } +} + +func TestScoreInactive(t *testing.T) { + info := checker.RepoInfo{ + PushedAt: time.Now().AddDate(-1, -6, 0), + IsArchived: false, + } + status := Score(info) + if status != StatusInactive { + t.Errorf("status = %q, want %q", status, StatusInactive) + } +} + +func TestScoreStale(t *testing.T) { + info := checker.RepoInfo{ + PushedAt: time.Now().AddDate(-3, 0, 0), + IsArchived: false, + } + status := Score(info) + if status != StatusStale { + t.Errorf("status = %q, want %q", status, StatusStale) + } +} + +func TestScoreArchived(t *testing.T) { + info := checker.RepoInfo{ + PushedAt: time.Now(), + IsArchived: true, + } + status := Score(info) + if status != StatusArchived { + t.Errorf("status = %q, want %q", status, StatusArchived) + } +} + +func TestScoreDisabled(t *testing.T) { + info := checker.RepoInfo{ + IsDisabled: true, + } + status := Score(info) + if status != StatusDead { + t.Errorf("status = %q, want %q", status, StatusDead) + } +} + +func TestGenerateReport(t *testing.T) { + results := []ScoredEntry{ + {URL: "https://github.com/a/a", Name: "a/a", Status: StatusHealthy, Stars: 100, LastPush: time.Now()}, + {URL: "https://github.com/b/b", Name: "b/b", Status: StatusArchived, Stars: 50, LastPush: time.Now()}, + { + URL: "https://github.com/c/c", + Name: "c/c", + Status: StatusStale, + Stars: 10, + LastPush: time.Now().AddDate(-3, 0, 0), + }, + } + report := GenerateReport(results) + if !strings.Contains(report, "Healthy: 1") { + t.Error("report should contain 'Healthy: 1'") + } + if !strings.Contains(report, "Archived: 1") { + t.Error("report should contain 'Archived: 1'") + } + if !strings.Contains(report, "Stale") { + t.Error("report should contain 'Stale'") + } +} + +func TestGenerateReportShowsAllEntries(t *testing.T) { + const entryCount = 55 + results := make([]ScoredEntry, 0, entryCount) + for i := range entryCount { + results = append(results, ScoredEntry{ + URL: fmt.Sprintf("https://github.com/stale/%d", i), + Name: fmt.Sprintf("stale/%d", i), + Status: StatusStale, + Stars: i, + LastPush: time.Now().AddDate(-3, 0, 0), + }) + } + + report := GenerateReport(results) + if strings.Contains(report, "... and") { + t.Fatal("report should not be truncated") + } + if !strings.Contains(report, fmt.Sprintf("stale/%d", entryCount-1)) { + t.Fatal("report should contain all entries") + } +} + +func TestGenerateJSONReport(t *testing.T) { + results := []ScoredEntry{ + { + URL: "https://github.com/a/a", + Name: "a/a", + Status: StatusHealthy, + Stars: 100, + LastPush: time.Now(), + }, + { + URL: "https://github.com/b/b", + Name: "b/b", + Status: StatusStale, + Stars: 50, + LastPush: time.Now().AddDate(-3, 0, 0), + }, + } + + data, err := GenerateJSONReport(results) + if err != nil { + t.Fatalf("GenerateJSONReport() error = %v", err) + } + + var report ReportData + if err := json.Unmarshal(data, &report); err != nil { + t.Fatalf("json.Unmarshal() error = %v", err) + } + if report.Total != 2 { + t.Fatalf("report.Total = %d, want 2", report.Total) + } + if report.Summary.Healthy != 1 || report.Summary.Stale != 1 { + t.Fatalf("summary = %+v, want healthy=1 stale=1", report.Summary) + } + if len(report.Entries) != 2 { + t.Fatalf("len(report.Entries) = %d, want 2", len(report.Entries)) + } + if len(report.ByStatus[StatusStale]) != 1 { + t.Fatalf("len(report.ByStatus[stale]) = %d, want 1", len(report.ByStatus[StatusStale])) + } +} + +func TestScoreAll(t *testing.T) { + infos := []checker.RepoInfo{ + {Owner: "a", Name: "a", PushedAt: time.Now(), Stars: 10}, + {Owner: "b", Name: "b", PushedAt: time.Now().AddDate(-3, 0, 0), Stars: 5}, + } + scored := ScoreAll(infos) + if len(scored) != 2 { + t.Fatalf("scored = %d, want 2", len(scored)) + } + if scored[0].Status != StatusHealthy { + t.Errorf("first = %q, want healthy", scored[0].Status) + } + if scored[1].Status != StatusStale { + t.Errorf("second = %q, want stale", scored[1].Status) + } +} diff --git a/internal/tui/model.go b/internal/tui/model.go new file mode 100644 index 000000000..4611d0e9f --- /dev/null +++ b/internal/tui/model.go @@ -0,0 +1,573 @@ +package tui + +import ( + "context" + "fmt" + "os/exec" + "runtime" + "strings" + "time" + "unicode/utf8" + + tea "charm.land/bubbletea/v2" + "charm.land/lipgloss/v2" + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +type panel int + +const ( + panelTree panel = iota + panelList +) + +const ( + entryHeight = 5 // lines rendered per entry in the list panel + scrollOff = 4 // minimum lines/entries kept visible above and below cursor +) + +// Model is the top-level Bubbletea model. +type Model struct { + filterText string + roots []*TreeNode + flatTree []FlatNode + currentEntries []cache.HealthEntry + activePanel panel + treeCursor int + treeOffset int + listCursor int + listOffset int + width int + height int + filtering bool +} + +// New creates a new Model from health cache entries. +func New(entries []cache.HealthEntry) Model { + roots := BuildTree(entries) + // Expand first root by default + if len(roots) > 0 { + roots[0].Expanded = true + } + flat := FlattenVisible(roots) + + m := Model{ + roots: roots, + flatTree: flat, + } + m.updateCurrentEntries() + return m +} + +// Init returns an initial command. +func (m Model) Init() tea.Cmd { + return nil +} + +// Update handles messages. +func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + switch msg := msg.(type) { + case tea.WindowSizeMsg: + m.width = msg.Width + m.height = msg.Height + return m, nil + + case openURLMsg: + return m, nil + + case tea.KeyPressMsg: + // Filter mode input + if m.filtering { + return m.handleFilterKey(msg) + } + + switch msg.String() { + case "q", "ctrl+c": + return m, tea.Quit + case "tab": + if m.activePanel == panelTree { + m.activePanel = panelList + } else { + m.activePanel = panelTree + } + case "/": + m.filtering = true + m.filterText = "" + default: + if m.activePanel == panelTree { + return m.handleTreeKey(msg) + } + return m.handleListKey(msg) + } + } + return m, nil +} + +func (m Model) handleFilterKey(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { + switch msg.String() { + case "esc": + m.filtering = false + m.filterText = "" + m.flatTree = FlattenVisible(m.roots) + m.updateCurrentEntries() + case "enter": + m.filtering = false + case "backspace": + if len(m.filterText) > 0 { + m.filterText = m.filterText[:len(m.filterText)-1] + m.applyFilter() + } + default: + r := msg.String() + if utf8.RuneCountInString(r) == 1 { + m.filterText += r + m.applyFilter() + } + } + return m, nil +} + +func (m *Model) applyFilter() { + if m.filterText == "" { + m.flatTree = FlattenVisible(m.roots) + m.updateCurrentEntries() + return + } + + query := strings.ToLower(m.filterText) + var filtered []cache.HealthEntry + for _, root := range m.roots { + entries := root.AllEntries() + for i := range entries { + e := &entries[i] + if strings.Contains(strings.ToLower(e.Name), query) || + strings.Contains(strings.ToLower(e.Description), query) || + strings.Contains(strings.ToLower(e.Category), query) { + filtered = append(filtered, *e) + } + } + } + m.currentEntries = filtered + m.listCursor = 0 + m.listOffset = 0 +} + +func (m Model) handleTreeKey(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { + switch msg.String() { + case "up", "k": + if m.treeCursor > 0 { + m.treeCursor-- + m.adjustTreeScroll() + m.updateCurrentEntries() + } + case "down", "j": + if m.treeCursor < len(m.flatTree)-1 { + m.treeCursor++ + m.adjustTreeScroll() + m.updateCurrentEntries() + } + case "enter", " ": + if m.treeCursor < len(m.flatTree) { + node := m.flatTree[m.treeCursor].Node + if node.HasChildren() { + node.Expanded = !node.Expanded + m.flatTree = FlattenVisible(m.roots) + if m.treeCursor >= len(m.flatTree) { + m.treeCursor = len(m.flatTree) - 1 + } + } + m.adjustTreeScroll() + m.updateCurrentEntries() + } + case "ctrl+d", "pgdown": + half := max(m.treePanelHeight()/2, 1) + m.treeCursor += half + if m.treeCursor >= len(m.flatTree) { + m.treeCursor = len(m.flatTree) - 1 + } + m.adjustTreeScroll() + m.updateCurrentEntries() + case "ctrl+u", "pgup": + half := max(m.treePanelHeight()/2, 1) + m.treeCursor -= half + if m.treeCursor < 0 { + m.treeCursor = 0 + } + m.adjustTreeScroll() + m.updateCurrentEntries() + case "g", "home": + m.treeCursor = 0 + m.adjustTreeScroll() + m.updateCurrentEntries() + case "G", "end": + m.treeCursor = len(m.flatTree) - 1 + m.adjustTreeScroll() + m.updateCurrentEntries() + case "right", "l": + if m.treeCursor < len(m.flatTree) { + node := m.flatTree[m.treeCursor].Node + if node.HasChildren() && !node.Expanded { + node.Expanded = true + m.flatTree = FlattenVisible(m.roots) + m.adjustTreeScroll() + m.updateCurrentEntries() + } else { + m.activePanel = panelList + } + } + case "left", "h": + if m.treeCursor < len(m.flatTree) { + node := m.flatTree[m.treeCursor].Node + if node.HasChildren() && node.Expanded { + node.Expanded = false + m.flatTree = FlattenVisible(m.roots) + m.adjustTreeScroll() + m.updateCurrentEntries() + } + } + } + return m, nil +} + +func (m *Model) adjustTreeScroll() { + visible := m.treePanelHeight() + off := min(scrollOff, visible/2) + if m.treeCursor < m.treeOffset+off { + m.treeOffset = m.treeCursor - off + } + if m.treeCursor >= m.treeOffset+visible-off { + m.treeOffset = m.treeCursor - visible + off + 1 + } + if m.treeOffset < 0 { + m.treeOffset = 0 + } +} + +func (m Model) treePanelHeight() int { + h := max( + // header, footer, borders, title + m.height-6, 1, + ) + return h +} + +func (m Model) handleListKey(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { + switch msg.String() { + case "up", "k": + if m.listCursor > 0 { + m.listCursor-- + m.adjustListScroll() + } + case "down", "j": + if m.listCursor < len(m.currentEntries)-1 { + m.listCursor++ + m.adjustListScroll() + } + case "ctrl+d", "pgdown": + half := max(m.visibleListEntries()/2, 1) + m.listCursor += half + if m.listCursor >= len(m.currentEntries) { + m.listCursor = len(m.currentEntries) - 1 + } + m.adjustListScroll() + case "ctrl+u", "pgup": + half := max(m.visibleListEntries()/2, 1) + m.listCursor -= half + if m.listCursor < 0 { + m.listCursor = 0 + } + m.adjustListScroll() + case "g", "home": + m.listCursor = 0 + m.adjustListScroll() + case "G", "end": + m.listCursor = len(m.currentEntries) - 1 + m.adjustListScroll() + case "enter": + if m.listCursor < len(m.currentEntries) { + return m, openURL(m.currentEntries[m.listCursor].URL) + } + case "left", "h": + m.activePanel = panelTree + } + return m, nil +} + +func (m *Model) updateCurrentEntries() { + if len(m.flatTree) == 0 { + m.currentEntries = nil + return + } + if m.treeCursor >= len(m.flatTree) { + m.treeCursor = len(m.flatTree) - 1 + } + node := m.flatTree[m.treeCursor].Node + m.currentEntries = node.AllEntries() + m.listCursor = 0 + m.listOffset = 0 +} + +func (m Model) visibleListEntries() int { + v := m.listPanelHeight() / entryHeight + if v < 1 { + return 1 + } + return v +} + +func (m *Model) adjustListScroll() { + visible := m.visibleListEntries() + off := min(scrollOff, visible/2) + if m.listCursor < m.listOffset+off { + m.listOffset = m.listCursor - off + } + if m.listCursor >= m.listOffset+visible-off { + m.listOffset = m.listCursor - visible + off + 1 + } + if m.listOffset < 0 { + m.listOffset = 0 + } +} + +func (m Model) listPanelHeight() int { + // height minus header, footer, borders + h := max(m.height-4, 1) + return h +} + +// View renders the UI. +func (m Model) View() tea.View { + if m.width == 0 || m.height == 0 { + return tea.NewView("Loading...") + } + + treeWidth := m.width*3/10 - 2 // 30% minus borders + listWidth := m.width - treeWidth - 6 // remaining minus borders/gaps + contentHeight := m.height - 3 // minus footer + + if treeWidth < 10 { + treeWidth = 10 + } + if listWidth < 20 { + listWidth = 20 + } + if contentHeight < 3 { + contentHeight = 3 + } + + tree := m.renderTree(treeWidth, contentHeight) + list := m.renderList(listWidth, contentHeight) + + // Apply border styles + treeBorder := inactiveBorderStyle + listBorder := inactiveBorderStyle + if m.activePanel == panelTree { + treeBorder = activeBorderStyle + } else { + listBorder = activeBorderStyle + } + + treePanel := treeBorder.Width(treeWidth).Height(contentHeight).Render(tree) + listPanel := listBorder.Width(listWidth).Height(contentHeight).Render(list) + + body := lipgloss.JoinHorizontal(lipgloss.Top, treePanel, listPanel) + + footer := m.renderFooter() + + content := lipgloss.JoinVertical(lipgloss.Left, body, footer) + + v := tea.NewView(content) + v.AltScreen = true + return v +} + +func (m Model) renderTree(width, height int) string { + var b strings.Builder + + title := headerStyle.Render("Categories") + b.WriteString(title) + b.WriteString("\n\n") + + linesUsed := 2 + end := min(m.treeOffset+height-2, len(m.flatTree)) + for i := m.treeOffset; i < end; i++ { + fn := m.flatTree[i] + if linesUsed >= height { + break + } + + indent := strings.Repeat(" ", fn.Depth) + icon := " " + if fn.Node.HasChildren() { + if fn.Node.Expanded { + icon = "▼ " + } else { + icon = "▶ " + } + } + + count := fn.Node.TotalEntries() + label := fmt.Sprintf("%s%s%s (%d)", indent, icon, fn.Node.Name, count) + + // Truncate to width + if len(label) > width { + label = label[:width-1] + "…" + } + + if i == m.treeCursor { + label = treeSelectedStyle.Render(label) + } else { + label = treeNormalStyle.Render(label) + } + + b.WriteString(label) + b.WriteString("\n") + linesUsed++ + } + + return b.String() +} + +func (m Model) renderList(width, height int) string { + var b strings.Builder + + // Title + title := "Resources" + if m.filtering && m.filterText != "" { + title = fmt.Sprintf("Resources (filter: %s)", m.filterText) + } + b.WriteString(headerStyle.Render(title)) + b.WriteString("\n\n") + + if len(m.currentEntries) == 0 { + b.WriteString(entryDescStyle.Render(" No entries")) + return b.String() + } + + linesUsed := 2 + + visible := max((height-2)/entryHeight, 1) + + start := m.listOffset + end := min(start+visible, len(m.currentEntries)) + + for idx := start; idx < end; idx++ { + if linesUsed+entryHeight > height { + break + } + + e := m.currentEntries[idx] + selected := idx == m.listCursor + + // Use a safe width that accounts for Unicode characters (★, ⑂) + // that some terminals render as 2 columns but lipgloss counts as 1. + safeWidth := width - 2 + + // Line 1: name + stars + forks + stats := fmt.Sprintf("★ %d", e.Stars) + if e.Forks > 0 { + stats += fmt.Sprintf(" ⑂ %d", e.Forks) + } + name := e.Name + statsW := lipgloss.Width(stats) + maxName := max( + // 2 for minimum gap + safeWidth-statsW-2, 4, + ) + if lipgloss.Width(name) > maxName { + name = truncateToWidth(name, maxName-1) + "…" + } + nameStr := entryNameStyle.Render(name) + statsStr := entryDescStyle.Render(stats) + padding := max(safeWidth-lipgloss.Width(nameStr)-lipgloss.Width(statsStr), 1) + line1 := nameStr + strings.Repeat(" ", padding) + statsStr + + // Line 2: URL + url := e.URL + if lipgloss.Width(url) > safeWidth { + url = truncateToWidth(url, safeWidth-1) + "…" + } + line2 := entryURLStyle.Render(url) + + // Line 3: description + desc := e.Description + if lipgloss.Width(desc) > safeWidth { + desc = truncateToWidth(desc, safeWidth-3) + "..." + } + line3 := entryDescStyle.Render(desc) + + // Line 4: status + last push + statusStr := statusStyle(e.Status).Render(e.Status) + lastPush := "" + if !e.LastPush.IsZero() { + lastPush = " Last push: " + e.LastPush.Format("2006-01-02") + } + line4 := statusStr + entryDescStyle.Render(lastPush) + + // Line 5: separator + sepWidth := max(safeWidth, 1) + line5 := entryDescStyle.Render(strings.Repeat("─", sepWidth)) + + entry := fmt.Sprintf("%s\n%s\n%s\n%s\n%s", line1, line2, line3, line4, line5) + + if selected && m.activePanel == panelList { + entry = entrySelectedStyle.Render(entry) + } + + b.WriteString(entry) + b.WriteString("\n") + linesUsed += entryHeight + } + + // Scroll indicator + if len(m.currentEntries) > visible { + indicator := fmt.Sprintf(" %d-%d of %d", start+1, end, len(m.currentEntries)) + b.WriteString(footerStyle.Render(indicator)) + } + + return b.String() +} + +func (m Model) renderFooter() string { + if m.filtering { + return filterPromptStyle.Render("/") + entryDescStyle.Render(m.filterText+"█") + } + help := " Tab:switch j/k:nav PgDn/PgUp:page g/G:top/bottom Enter:expand/open /:filter q:quit" + return footerStyle.Render(help) +} + +// openURLMsg is sent after attempting to open a URL. +type openURLMsg struct{ err error } + +func openURL(url string) tea.Cmd { + return func() tea.Msg { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + var cmd *exec.Cmd + switch runtime.GOOS { + case "darwin": + cmd = exec.CommandContext(ctx, "open", url) + case "windows": + cmd = exec.CommandContext(ctx, "cmd", "/c", "start", url) + default: + cmd = exec.CommandContext(ctx, "xdg-open", url) + } + return openURLMsg{err: cmd.Run()} + } +} + +// truncateToWidth truncates s to at most maxWidth visible columns. +func truncateToWidth(s string, maxWidth int) string { + if maxWidth <= 0 { + return "" + } + w := 0 + for i, r := range s { + rw := lipgloss.Width(string(r)) + if w+rw > maxWidth { + return s[:i] + } + w += rw + } + return s +} diff --git a/internal/tui/styles.go b/internal/tui/styles.go new file mode 100644 index 000000000..8abc31ec8 --- /dev/null +++ b/internal/tui/styles.go @@ -0,0 +1,62 @@ +package tui + +import "charm.land/lipgloss/v2" + +var ( + // Panel borders + activeBorderStyle = lipgloss.NewStyle(). + Border(lipgloss.RoundedBorder()). + BorderForeground(lipgloss.Color("#7D56F4")) + + inactiveBorderStyle = lipgloss.NewStyle(). + Border(lipgloss.RoundedBorder()). + BorderForeground(lipgloss.Color("#555555")) + + // Tree styles + treeSelectedStyle = lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.Color("#FF79C6")). + Background(lipgloss.Color("#3B2D50")) + treeNormalStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#CCCCCC")) + + // Entry styles + entryNameStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#50FA7B")) + entryURLStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#888888")).Italic(true) + entryDescStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#CCCCCC")) + + // Status badge styles + statusHealthyStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#50FA7B")).Bold(true) + statusInactiveStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFB86C")) + statusStaleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#F1FA8C")) + statusArchivedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5555")).Bold(true) + statusDeadStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#666666")).Strikethrough(true) + + // Selected entry + entrySelectedStyle = lipgloss.NewStyle().Background(lipgloss.Color("#44475A")) + + // Header + headerStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#BD93F9")).Padding(0, 1) + + // Footer + footerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#666666")) + + // Filter + filterPromptStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF79C6")).Bold(true) +) + +func statusStyle(status string) lipgloss.Style { + switch status { + case "healthy": + return statusHealthyStyle + case "inactive": + return statusInactiveStyle + case "stale": + return statusStaleStyle + case "archived": + return statusArchivedStyle + case "dead": + return statusDeadStyle + default: + return lipgloss.NewStyle() + } +} diff --git a/internal/tui/tree.go b/internal/tui/tree.go new file mode 100644 index 000000000..4e5ecc878 --- /dev/null +++ b/internal/tui/tree.go @@ -0,0 +1,119 @@ +package tui + +import ( + "sort" + "strings" + + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +// TreeNode represents a node in the category tree. +type TreeNode struct { + Name string + Path string + Children []*TreeNode + Entries []cache.HealthEntry + Expanded bool +} + +// FlatNode is a visible tree node with its indentation depth. +type FlatNode struct { + Node *TreeNode + Depth int +} + +// HasChildren returns true if this node has child categories. +func (n *TreeNode) HasChildren() bool { + return len(n.Children) > 0 +} + +// TotalEntries returns the count of entries in this node and all descendants. +func (n *TreeNode) TotalEntries() int { + count := len(n.Entries) + for _, c := range n.Children { + count += c.TotalEntries() + } + return count +} + +// AllEntries returns entries from this node and all descendants. +func (n *TreeNode) AllEntries() []cache.HealthEntry { + result := make([]cache.HealthEntry, 0, n.TotalEntries()) + result = append(result, n.Entries...) + for _, c := range n.Children { + result = append(result, c.AllEntries()...) + } + return result +} + +// BuildTree constructs a tree from flat HealthEntry slice, grouping by Category. +func BuildTree(entries []cache.HealthEntry) []*TreeNode { + root := &TreeNode{Name: "root"} + nodeMap := map[string]*TreeNode{} + + for i := range entries { + e := &entries[i] + cat := e.Category + if cat == "" { + cat = "Uncategorized" + } + + node := ensureNode(root, nodeMap, cat) + node.Entries = append(node.Entries, *e) + } + + // Sort children at every level + sortTree(root) + return root.Children +} + +func ensureNode(root *TreeNode, nodeMap map[string]*TreeNode, path string) *TreeNode { + if n, ok := nodeMap[path]; ok { + return n + } + + parts := strings.Split(path, " > ") + current := root + for i, part := range parts { + subpath := strings.Join(parts[:i+1], " > ") + if n, ok := nodeMap[subpath]; ok { + current = n + continue + } + child := &TreeNode{ + Name: part, + Path: subpath, + } + current.Children = append(current.Children, child) + nodeMap[subpath] = child + current = child + } + return current +} + +func sortTree(node *TreeNode) { + sort.Slice(node.Children, func(i, j int) bool { + return node.Children[i].Name < node.Children[j].Name + }) + for _, c := range node.Children { + sortTree(c) + } +} + +// FlattenVisible returns visible nodes in depth-first order for rendering. +func FlattenVisible(roots []*TreeNode) []FlatNode { + var result []FlatNode + for _, r := range roots { + flattenNode(r, 0, &result) + } + return result +} + +func flattenNode(node *TreeNode, depth int, result *[]FlatNode) { + *result = append(*result, FlatNode{Node: node, Depth: depth}) + if node.Expanded { + for _, c := range node.Children { + flattenNode(c, depth+1, result) + } + } +} diff --git a/internal/tui/tree_test.go b/internal/tui/tree_test.go new file mode 100644 index 000000000..71c1fc01a --- /dev/null +++ b/internal/tui/tree_test.go @@ -0,0 +1,114 @@ +package tui + +import ( + "testing" + + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +func TestBuildTree(t *testing.T) { + entries := []cache.HealthEntry{ + {URL: "https://github.com/a/b", Name: "a/b", Category: "Projects > Networking", Description: "desc1"}, + {URL: "https://github.com/c/d", Name: "c/d", Category: "Projects > Networking", Description: "desc2"}, + {URL: "https://github.com/e/f", Name: "e/f", Category: "Projects > Security", Description: "desc3"}, + { + URL: "https://github.com/g/h", + Name: "g/h", + Category: "Docker Images > Base Tools", + Description: "desc4", + }, + {URL: "https://github.com/i/j", Name: "i/j", Category: "", Description: "no category"}, + } + + roots := BuildTree(entries) + + // Should have 3 roots: Docker Images, Projects, Uncategorized (sorted) + if len(roots) != 3 { + t.Fatalf("expected 3 roots, got %d", len(roots)) + } + + if roots[0].Name != "Docker Images" { + t.Errorf("expected first root 'Docker Images', got %q", roots[0].Name) + } + if roots[1].Name != "Projects" { + t.Errorf("expected second root 'Projects', got %q", roots[1].Name) + } + if roots[2].Name != "Uncategorized" { + t.Errorf("expected third root 'Uncategorized', got %q", roots[2].Name) + } + + // Projects > Networking should have 2 entries + projects := roots[1] + if len(projects.Children) != 2 { + t.Fatalf("expected 2 children under Projects, got %d", len(projects.Children)) + } + networking := projects.Children[0] // Networking < Security alphabetically + if networking.Name != "Networking" { + t.Errorf("expected 'Networking', got %q", networking.Name) + } + if len(networking.Entries) != 2 { + t.Errorf("expected 2 entries in Networking, got %d", len(networking.Entries)) + } +} + +func TestBuildTreeEmpty(t *testing.T) { + roots := BuildTree(nil) + if len(roots) != 0 { + t.Errorf("expected 0 roots for nil input, got %d", len(roots)) + } +} + +func TestTotalEntries(t *testing.T) { + entries := []cache.HealthEntry{ + {URL: "https://a", Category: "A > B"}, + {URL: "https://b", Category: "A > B"}, + {URL: "https://c", Category: "A > C"}, + {URL: "https://d", Category: "A"}, + } + roots := BuildTree(entries) + if len(roots) != 1 { + t.Fatalf("expected 1 root, got %d", len(roots)) + } + if roots[0].TotalEntries() != 4 { + t.Errorf("expected 4 total entries, got %d", roots[0].TotalEntries()) + } +} + +func TestFlattenVisible(t *testing.T) { + entries := []cache.HealthEntry{ + {URL: "https://a", Category: "A > B"}, + {URL: "https://b", Category: "A > C"}, + } + roots := BuildTree(entries) + + // Initially not expanded, should see just root + flat := FlattenVisible(roots) + if len(flat) != 1 { + t.Fatalf("expected 1 visible node (collapsed), got %d", len(flat)) + } + if flat[0].Depth != 0 { + t.Errorf("expected depth 0, got %d", flat[0].Depth) + } + + // Expand root + roots[0].Expanded = true + flat = FlattenVisible(roots) + if len(flat) != 3 { + t.Fatalf("expected 3 visible nodes (expanded), got %d", len(flat)) + } + if flat[1].Depth != 1 { + t.Errorf("expected depth 1 for child, got %d", flat[1].Depth) + } +} + +func TestAllEntries(t *testing.T) { + entries := []cache.HealthEntry{ + {URL: "https://a", Category: "A > B"}, + {URL: "https://b", Category: "A"}, + } + roots := BuildTree(entries) + all := roots[0].AllEntries() + if len(all) != 2 { + t.Errorf("expected 2 entries from AllEntries, got %d", len(all)) + } +} diff --git a/internal/tui/tui.go b/internal/tui/tui.go new file mode 100644 index 000000000..2a8ece315 --- /dev/null +++ b/internal/tui/tui.go @@ -0,0 +1,14 @@ +package tui + +import ( + tea "charm.land/bubbletea/v2" + "github.com/veggiemonk/awesome-docker/internal/cache" +) + +// Run launches the TUI browser. It blocks until the user quits. +func Run(entries []cache.HealthEntry) error { + m := New(entries) + p := tea.NewProgram(m) + _, err := p.Run() + return err +} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index abc805e6b..000000000 --- a/package-lock.json +++ /dev/null @@ -1,1100 +0,0 @@ -{ - "name": "awesome-docker-website", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "awesome-docker-website", - "version": "1.0.0", - "license": "Apache-2.0", - "dependencies": { - "cheerio": "1.0.0-rc.10", - "draftlog": "1.0.13", - "fs-extra": "10.0.0", - "node-fetch": "3.0.0", - "rimraf": "3.0.2", - "showdown": "^1.9.0" - } - }, - "node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "dependencies": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", - "dependencies": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/draftlog": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/draftlog/-/draftlog-1.0.13.tgz", - "integrity": "sha512-GeMWOpXERBpfVDK6v7m0x1hPg8+g8ZsZWqJl2T17wHqrm4h8fnjiZmXcnCrmwogAc6R3YTxFXax15wezfuyCUw==" - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/fetch-blob": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.2.tgz", - "integrity": "sha512-hunJbvy/6OLjCD0uuhLdp0mMPzP/yd2ssd1t2FCJsaA7wkWhpbp9xfuNVpv7Ll4jFhzp6T4LAupSiV9uOeg0VQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "engines": { - "node": ">=4" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/node-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz", - "integrity": "sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==", - "dependencies": { - "data-uri-to-buffer": "^3.0.1", - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "node_modules/showdown": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", - "integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==", - "dependencies": { - "yargs": "^14.2" - }, - "bin": { - "showdown": "bin/showdown.js" - } - }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.1.1.tgz", - "integrity": "sha512-Czi3fG883e96T4DLEPRvufrF2ydhOOW1+1a6c3gNjH2aIh50DNFBdfwh2AKoOf1rXvpvavAoA11Qdq9+BKjE0Q==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "node_modules/yargs": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", - "dependencies": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "node_modules/yargs-parser": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", - "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "requires": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - } - }, - "cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", - "requires": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", - "requires": { - "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" - } - }, - "css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==" - }, - "data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==" - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, - "draftlog": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/draftlog/-/draftlog-1.0.13.tgz", - "integrity": "sha512-GeMWOpXERBpfVDK6v7m0x1hPg8+g8ZsZWqJl2T17wHqrm4h8fnjiZmXcnCrmwogAc6R3YTxFXax15wezfuyCUw==" - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - }, - "fetch-blob": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.2.tgz", - "integrity": "sha512-hunJbvy/6OLjCD0uuhLdp0mMPzP/yd2ssd1t2FCJsaA7wkWhpbp9xfuNVpv7Ll4jFhzp6T4LAupSiV9uOeg0VQ==", - "requires": { - "web-streams-polyfill": "^3.0.3" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "node-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz", - "integrity": "sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==", - "requires": { - "data-uri-to-buffer": "^3.0.1", - "fetch-blob": "^3.1.2" - } - }, - "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", - "requires": { - "boolbase": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "requires": { - "parse5": "^6.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "showdown": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", - "integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==", - "requires": { - "yargs": "^14.2" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - }, - "web-streams-polyfill": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.1.1.tgz", - "integrity": "sha512-Czi3fG883e96T4DLEPRvufrF2ydhOOW1+1a6c3gNjH2aIh50DNFBdfwh2AKoOf1rXvpvavAoA11Qdq9+BKjE0Q==" - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "yargs": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", - "requires": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "yargs-parser": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", - "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 278c7cff2..000000000 --- a/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "awesome-docker-website", - "version": "1.0.0", - "description": "A curated list of Docker resources and projects Inspired by @sindresorhus and improved by amazing contributors", - "main": "build.js", - "scripts": { - "build": "rimraf ./dist/ && node build.js", - "test-pr": "node tests/pull_request.mjs", - "test": "node tests/test_all.mjs" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/veggiemonk/awesome-docker.git" - }, - "author": "Julien Bisconti ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/veggiemonk/awesome-docker/issues" - }, - "homepage": "https://github.com/veggiemonk/awesome-docker#readme", - "dependencies": { - "cheerio": "1.0.0-rc.10", - "draftlog": "1.0.13", - "fs-extra": "10.0.0", - "node-fetch": "3.0.0", - "rimraf": "3.0.2", - "showdown": "^1.9.0" - } -} diff --git a/scripts/fix_yen_placement.py b/scripts/fix_yen_placement.py new file mode 100644 index 000000000..7118435f9 --- /dev/null +++ b/scripts/fix_yen_placement.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Normalize :yen: placement in README.md entries. + +Transformations (only on list entries — leaves legend lines and section prose alone): + - [Title :yen:](url) - desc -> - [Title](url) - :yen: desc + - [Title](url) :yen:- desc -> - [Title](url) - :yen: desc + - [Title](url) :yen: desc -> - [Title](url) - :yen: desc + - [Title](url) :yen: -> - [Title](url) - :yen: + +Idempotent: already-correct lines pass through untouched. +""" +from __future__ import annotations + +import re +import sys +from pathlib import Path + +# Entry where :yen: is inside the link title. +RE_IN_TITLE = re.compile(r'^(\s*[-*]\s+\[)([^\]]*?)\s+:yen:(\s*\]\([^)]+\))(\s*-?\s*)(.*)$') + +# Entry where :yen: sits right after the URL, followed by "- desc", " desc", or nothing. +RE_AFTER_URL = re.compile(r'^(\s*[-*]\s+\[[^\]]+\]\([^)]+\))\s+:yen:\s*(-\s*)?(.*)$') + +# Already-correct entries: "(url) - :yen: ..." +RE_ALREADY_OK = re.compile(r'\]\([^)]+\)\s+-\s+:yen:(\s|$)') + + +def transform(line: str) -> str: + if ':yen:' not in line: + return line + if RE_ALREADY_OK.search(line): + return line + + m = RE_IN_TITLE.match(line) + if m: + prefix, title, link_close, _sep, desc = m.groups() + desc = desc.lstrip() + if desc: + return f"{prefix}{title.rstrip()}{link_close} - :yen: {desc}" + return f"{prefix}{title.rstrip()}{link_close} - :yen:" + + m = RE_AFTER_URL.match(line) + if m: + head, _dash, desc = m.groups() + desc = desc.lstrip() + if desc: + return f"{head} - :yen: {desc}" + return f"{head} - :yen:" + + return line + + +def main(path: str) -> int: + p = Path(path) + original = p.read_text() + out_lines = [] + changed = 0 + for line in original.splitlines(): + new = transform(line) + if new != line: + changed += 1 + out_lines.append(new) + # Preserve trailing newline. + new_text = "\n".join(out_lines) + if original.endswith("\n"): + new_text += "\n" + if new_text != original: + p.write_text(new_text) + print(f"{changed} line(s) changed in {path}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1] if len(sys.argv) > 1 else "README.md")) diff --git a/tests/common.mjs b/tests/common.mjs deleted file mode 100644 index add834deb..000000000 --- a/tests/common.mjs +++ /dev/null @@ -1,104 +0,0 @@ -import fetch from 'node-fetch'; -import {readFileSync} from 'fs'; - -const LINKS_OPTIONS = { - redirect: 'error', - headers: { - 'Content-Type': 'application/json', - 'user-agent': - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', - }, -}; - -const LOG = { - error: (...args) => console.error('❌ ERROR', args), - error_string: (...args) => - console.error('❌ ERROR', JSON.stringify({ ...args }, null, ' ')), - debug: (...args) => { - if (process.env.DEBUG) console.log('>>> DEBUG: ', { ...args }); - }, - debug_string: (...args) => { - if (process.env.DEBUG) - console.log('>>> DEBUG: ', JSON.stringify({ ...args }, null, ' ')); - }, -}; - -const handleFailure = (error) => { - console.error(`${error.message}: ${error.stack}`, { error }); - process.exit(1); -}; - -process.on('unhandledRejection', handleFailure); - -const extract_all_links = (markdown) => { - // if you have a problem and you try to solve it with a regex, - // now you have two problems - // TODO: replace this mess with a mardown parser ? - const re = /(((https:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w\-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/@\-\\\w]*))?)/g; - return markdown.match(re); -}; - -const find_duplicates = (arr) => { - const hm = {}; - const dup = []; - arr.forEach((e) => { - if (hm[e]) dup.push(e); - else hm[e] = true; - }); - return dup; -}; - -const partition = (arr, func) => { - const ap = [[], []]; - arr.forEach((e) => (func(e) ? ap[0].push(e) : ap[1].push(e))); - return ap; -}; - -async function fetch_link(url) { - try { - const { ok, statusText, redirected } = await fetch(url, LINKS_OPTIONS); - return [url, { ok, status: statusText, redirected }]; - } catch (error) { - return [url, { ok: false, status: error.message }]; - } -} - -async function batch_fetch({ arr, get, post_filter_func, BATCH_SIZE = 8 }) { - const result = []; - /* eslint-disable no-await-in-loop */ - for (let i = 0; i < arr.length; i += BATCH_SIZE) { - const batch = arr.slice(i, i + BATCH_SIZE); - LOG.debug_string({ batch }); - let res = await Promise.all(batch.map(get)); - console.log(`batch fetched...${i + BATCH_SIZE}`); - res = post_filter_func ? res.filter(post_filter_func) : res; - LOG.debug_string({ res }); - result.push(...res); - } - return result; -} - -const data = readFileSync('./tests/exclude_in_test.json') -const exclude = JSON.parse(data) -const exclude_length = exclude.length; -const exclude_from_list = (link) => { - let is_excluded = false; - for (let i = 0; i < exclude_length; i += 1) { - if (link.startsWith(exclude[i])) { - is_excluded = true; - break; - } - } - return is_excluded; -}; - -export default { - LOG, - handleFailure, - extract_all_links, - find_duplicates, - partition, - fetch_link, - batch_fetch, - exclude_from_list, -}; diff --git a/tests/exclude_in_test.json b/tests/exclude_in_test.json deleted file mode 100644 index d6673a324..000000000 --- a/tests/exclude_in_test.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - "https://vimeo.com", - "https://travis-ci.org/veggiemonk/awesome-docker.svg", - "https://github.com/apps/", - "https://cycle.io/", - "https://www.manning.com/", - "https://deepfence.io", - "https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg", - "https://www.se-radio.net/2017/05/se-radio-episode-290-diogo-monica-on-docker-security" -] diff --git a/tests/pull_request.mjs b/tests/pull_request.mjs deleted file mode 100644 index 2b7e82b4a..000000000 --- a/tests/pull_request.mjs +++ /dev/null @@ -1,66 +0,0 @@ -import fs from 'fs-extra'; -import helper from './common.mjs'; - -console.log({ - DEBUG: process.env.DEBUG || false, -}); - -const README = 'README.md'; - -async function main() { - const has_error = { - show: false, - duplicates: '', - other_links_error: '', - }; - const markdown = await fs.readFile(README, 'utf8'); - let links = helper.extract_all_links(markdown); - links = links.filter((l) => !helper.exclude_from_list(l)); // exclude websites - helper.LOG.debug_string({ links }); - - console.log(`total links to check ${links.length}`); - - console.log('checking for duplicates links...'); - - const duplicates = helper.find_duplicates(links); - if (duplicates.length > 0) { - has_error.show = true; - has_error.duplicates = duplicates; - } - helper.LOG.debug_string({ duplicates }); - const [github_links, external_links] = helper.partition(links, (link) => - link.startsWith('https://github.com'), - ); - - console.log(`checking ${external_links.length} external links...`); - - const external_links_error = await helper.batch_fetch({ - arr: external_links, - get: helper.fetch_link, - post_filter_func: (x) => !x[1].ok, - BATCH_SIZE: 8, - }); - if (external_links_error.length > 0) { - has_error.show = true; - has_error.other_links_error = external_links_error; - } - - console.log(`checking ${github_links.length} GitHub repositories...`); - - console.log( - `skipping GitHub repository check. Run "npm run test" to execute them manually.`, - ); - - console.log({ - TEST_PASSED: !has_error.show, - EXTERNAL_LINKS: external_links.length, - }); - - if (has_error.show) { - helper.LOG.error_string(has_error); - process.exit(1); - } -} - -console.log('starting...'); -main(); diff --git a/tests/test_all.mjs b/tests/test_all.mjs deleted file mode 100644 index 371469f32..000000000 --- a/tests/test_all.mjs +++ /dev/null @@ -1,111 +0,0 @@ -import fs from 'fs-extra'; -import fetch from 'node-fetch'; -import helper from './common.mjs'; - -function envvar_undefined(variable_name) { - throw new Error(`${variable_name} must be defined`); -} - -console.log({ - DEBUG: process.env.DEBUG || false, -}); - -const README = 'README.md'; -const GITHUB_GQL_API = 'https://api.github.com/graphql'; -const TOKEN = process.env.GITHUB_TOKEN || envvar_undefined('GITHUB_TOKEN'); - -const Authorization = `token ${TOKEN}`; - -const make_GQL_options = (query) => ({ - method: 'POST', - headers: { - Authorization, - 'Content-Type': 'application/json', - 'user-agent': - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', - }, - body: JSON.stringify({ query }), -}); - -const extract_repos = (arr) => - arr - .map((e) => e.substr('https://github.com/'.length).split('/')) - .filter((r) => r.length === 2 && r[1] !== ''); - -const generate_GQL_query = (arr) => - `query AWESOME_REPOS{ ${arr - .map( - ([owner, name]) => - `repo_${owner.replace(/(-|\.)/g, '_')}_${name.replace( - /(-|\.)/g, - '_', - )}: repository(owner: "${owner}", name:"${name}"){ nameWithOwner } `, - ) - .join('')} }`; - -async function main() { - const has_error = { - show: false, - duplicates: '', - other_links_error: '', - github_repos: '', - }; - const markdown = await fs.readFile(README, 'utf8'); - let links = helper.extract_all_links(markdown); - links = links.filter((l) => !helper.exclude_from_list(l)); // exclude websites - helper.LOG.debug_string({ links }); - - console.log(`total links to check ${links.length}`); - - console.log('checking for duplicates links...'); - - const duplicates = helper.find_duplicates(links); - if (duplicates.length > 0) { - has_error.show = true; - has_error.duplicates = duplicates; - } - helper.LOG.debug_string({ duplicates }); - const [github_links, external_links] = helper.partition(links, (link) => - link.startsWith('https://github.com'), - ); - - console.log(`checking ${external_links.length} external links...`); - - const external_links_error = await helper.batch_fetch({ - arr: external_links, - get: helper.fetch_link, - post_filter_func: (x) => !x[1].ok, - BATCH_SIZE: 8, - }); - if (external_links_error.length > 0) { - has_error.show = true; - has_error.other_links_error = external_links_error; - } - - console.log(`checking ${github_links.length} GitHub repositories...`); - - const repos = extract_repos(github_links); - const query = generate_GQL_query(repos); - const options = make_GQL_options(query); - const gql_response = await fetch(GITHUB_GQL_API, options).then((r) => - r.json(), - ); - if (gql_response.errors) { - has_error.show = true; - has_error.github_repos = gql_response.errors; - } - - console.log({ - TEST_PASSED: has_error.show, - GITHUB_REPOSITORY: github_links.length, - EXTERNAL_LINKS: external_links.length, - }); - - if (has_error.show) { - helper.LOG.error_string(has_error); - process.exit(1); - } -} - -console.log('starting...'); -main(); diff --git a/website/index.tmpl.html b/website/index.tmpl.html deleted file mode 100644 index 94e88e02f..000000000 --- a/website/index.tmpl.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - Awesome-docker - - - - - - - - - - - -
- - - - -