Skip to content

Install portmanager from the published Docker image - #13

Merged
lacraig2 merged 3 commits into
mainfrom
feature/docker-install
Jun 26, 2026
Merged

Install portmanager from the published Docker image#13
lacraig2 merged 3 commits into
mainfrom
feature/docker-install

Conversation

@lacraig2

Copy link
Copy Markdown
Collaborator

What

Adds the missing "easy install from the container into the local system" piece. Publishing itself was already wired up (multi-arch `Dockerfile` + `.github/workflows/docker.yml` pushing `lacraig2/portmanager`).

  • `scripts/install.sh` — a `curl | bash` installer that pulls the published image and installs locally, adapting to the host OS:
    • Linux: extracts the static-musl binary into `/.local/bin/portmanager` and the bundled agents into `/.cache/portmanager/dist/` (lookup rule M1: correctness & safety fixes #4 in `bootstrap.rs`). Runs natively — no Docker at runtime.
    • macOS / other: installs a thin `portmanager` wrapper that runs the client in a container (mirrors `pm.sh docker-run`). Docker required at runtime.
    • Overridable via `PORTMANAGER_IMAGE` / `PORTMANAGER_PREFIX`, or a positional image arg to pin a version. Warns if the prefix isn't on `PATH`.
  • README — new `## Install` section with the one-liner, plus a cross-reference from the Docker section.

Test

  • `bash -n` clean; verified the generated macOS wrapper escapes correctly (image baked in literally, `$HOME`/`$(id -u)` preserved as runtime refs).

Luke Craig added 3 commits June 23, 2026 17:22
Add scripts/install.sh: a curl|bash installer that pulls the published
lacraig2/portmanager image and installs locally. On Linux it extracts the
static-musl binary into ~/.local/bin and the bundled agents into the dist
cache (no Docker needed at runtime); on macOS/other it installs a thin
docker-run wrapper. Document it in a new README Install section.
On main pushes, docker.yml now computes the next version with the same
action+inputs as ci.yml's release job (reecetech/version-increment,
use_api:true) and tags the image with it. ci.yml's release job is gated
behind the slow test+build jobs, so this step reads the same latest
release and yields the same version — the image version matches the
GitHub release cut from the same commit. Tag-push behavior unchanged.
COPY scripts/install.sh to /install.sh in the runtime image so the image
can install itself onto the host without a GitHub fetch:
  docker run --rm --entrypoint cat lacraig2/portmanager:latest /install.sh | bash
Document it in the README Install section.
@lacraig2
lacraig2 merged commit 7d8a613 into main Jun 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant