← back to dockerpatch

Documentation

Reference for the dockerpatch CLI patch and the catalog server it talks to.

Installation

curl -fsSL https://raw.githubusercontent.com/Luishae07/dockerpatch/main/install.sh | bash

This patches the local docker CLI to add an install subcommand. All other subcommands are unaffected.

Usage

docker install                  # list available packages
docker install <name>           # install one, e.g:
docker install portainer

How it works

install.sh renames the existing docker binary to docker-real and replaces it with a wrapper. The wrapper intercepts the install subcommand; every other invocation is passed through to docker-real unmodified, so behavior is unaffected by Docker version or configuration.

To remove the patch: delete the wrapper and rename docker-real back to docker.

Architecture

componentdescription
patch/CLI wrapper (Go)
server/catalog and script server (Go)
index.html, submit.html, findinstalls.html, docs.htmlstatic site, served via GitHub Pages

The catalog data itself (packages.json, the install scripts) is not part of this repository — it's runtime data read by the deployed server instance from its own local disk.

The server is exposed via a Cloudflare quick tunnel, which issues a new hostname on each restart. tunnel-url.txt at the repository root holds the current one; clients fetch it at request time rather than hardcoding a URL.

Self-hosting

server/ can be run independently of the hosted instance.

cd server
go build -o dockerpatch-server .
./dockerpatch-server          # listens on :8940 by default
variabledefaultpurpose
PORT8940listen port
DOCKERPATCH_CATALOGpackages.jsonpath to the catalog file
DOCKERPATCH_SCRIPTS_BUNDLEscripts_bundle.jsonpath to the script bundle

Both files are reloaded on every request, so catalog edits take effect immediately without a restart.

API reference

GET/api/list
Returns the full catalog as JSON.
curl $(curl -s https://luishae07.github.io/dockerpatch/tunnel-url.txt)/api/list

[{ "name": "portainer", "description": "Docker management UI", "install_id": "7da65835", "info_url": "/api/info/portainer" }, ...]
GET/api/info/<name>
Returns the script URL for one package.
curl $(curl -s https://luishae07.github.io/dockerpatch/tunnel-url.txt)/api/info/portainer
→ /scripts/portainer.txt
GET/scripts/<name>.txt
Returns the install script as plain text.
curl $(curl -s https://luishae07.github.io/dockerpatch/tunnel-url.txt)/scripts/portainer.txt
→ #!/usr/bin/env bash
   set -e
   echo "Installing portainer..."
   docker run -d -p 9000:9000 --name portainer ...

Install IDs

Each package's install-id is the first 8 bytes of sha256(name), hex-encoded, making it deterministic across restarts. Look one up via findinstalls.html.

Catalog sources

sourcedescription
Curateda base set of established self-hostable applications
GitHub code searchan internal discovery process that searches GitHub for docker run -d -p commands and appends new matches, deduplicated by Docker image
submit.htmlextracts a docker run command from a specified repository for review before adding it to the catalog

FAQ

Does this replace Docker?
No. It wraps the existing installation; removing the patch restores the original binary.
Is it safe to run an install script without reviewing it?
docker install <name> runs a published docker run command over HTTPS. Review /scripts/<name>.txt beforehand if preferred.
Why does the server URL change?
It runs behind a Cloudflare quick tunnel, which assigns a new hostname on each restart. tunnel-url.txt reflects the current one.
Can a separate catalog be run instead of the hosted one?
Yes — see Self-hosting.

Troubleshooting

symptomcause
unsupported protocol scheme ""cached tunnel URL is stale; re-run install.sh
package not foundname mismatch, or the package was renamed/removed — run docker install with no arguments to see current names
409 when submitting via submit.htmlthe requested name already exists in the catalog
Submit page remains on "Searching GitHub..."GitHub's unauthenticated search rate limit (10 requests/minute) has been reached

Source

github.com/Luishae07/dockerpatch