-
Notifications
You must be signed in to change notification settings - Fork 2
Publish Docker Hub overview on each release #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # Stellar CLI | ||
|
|
||
| Docker images for the [Stellar CLI](https://github.com/stellar/stellar-cli). | ||
|
|
||
| Also compatible as a | ||
| [SEP-58](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0058.md) | ||
| image for reproducible Stellar contract builds. | ||
|
|
||
| Each image: | ||
|
|
||
| - Pins its base via the official `rust:<version>-<suffix>` multi-arch index | ||
| digest. | ||
| - Pins the Rust toolchain via `RUSTUP_TOOLCHAIN`, baked in so an in-source | ||
| `rust-toolchain.toml` cannot silently swap it. | ||
| - Pins `stellar-cli` to a specific upstream commit, installed with | ||
| `cargo install --locked`. | ||
| - Ships with the `wasm32v1-none` target preinstalled. | ||
| - Sets `WORKDIR /source` and `ENTRYPOINT ["stellar"]`. | ||
|
|
||
| ## Quick start | ||
|
|
||
| Pull a published image: | ||
|
|
||
| ```sh | ||
| docker run --rm docker.io/stellar/stellar-cli:latest --version | ||
| ``` | ||
|
|
||
| Confirm the rustc version used: | ||
|
|
||
| ```sh | ||
| docker run --rm --entrypoint rustc docker.io/stellar/stellar-cli:latest --version | ||
| ``` | ||
|
|
||
| Build a contract by mounting the contract directory at `/source`: | ||
|
|
||
| ```sh | ||
| docker run --rm -v "$PWD:/source" docker.io/stellar/stellar-cli:latest contract build --locked | ||
| ``` | ||
|
|
||
| The image exposes four well-known paths: | ||
|
|
||
| | Path | What | | ||
| | ---------- | --------------------------------------------------------------------------------- | | ||
| | `/source` | `WORKDIR`. Bind-mount your contract here. | | ||
| | `/config` | `STELLAR_CONFIG_HOME`. Mount to persist network and identity configuration. | | ||
| | `/data` | `STELLAR_DATA_HOME`. Mount to persist CLI data. | | ||
| | `/stellar` | Home for user `stellar` (UID 1000). Mount to persist the cargo cache (see below). | | ||
|
|
||
| The image runs as user `stellar` (UID 1000) with `/stellar` as the home | ||
| directory. `CARGO_HOME` resolves to `/stellar/.cargo` inside the container, | ||
| which is wiped on exit by default. | ||
|
|
||
| To reuse cargo's registry index, git checkouts, and crate sources across runs — | ||
| and to make the image work under `--user "$(id -u):$(id -g)"` on Linux hosts | ||
| whose UID is not 1000 — mount a writable host directory at `/stellar`: | ||
|
|
||
| ```sh | ||
| mkdir -p /tmp/myproject | ||
| docker run --rm \ | ||
| --user "$(id -u):$(id -g)" \ | ||
| -v /tmp/myproject:/stellar \ | ||
| -v "$PWD:/source" \ | ||
| docker.io/stellar/stellar-cli:latest contract build --locked | ||
| ``` | ||
|
|
||
| ## Verifiable builds ([SEP-58](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0058.md)) | ||
|
|
||
| For verifiable references, **always pin to a per-arch single-architecture digest | ||
| (`@sha256:…`)** — it is the only stable reference. Never use a tag or a | ||
| multi-arch manifest list digest in `bldimg`: | ||
|
|
||
| ```sh | ||
| # List the per-arch digest for each platform behind a tag. Pick any of the | ||
| # manifest-list tags from the release notes, e.g. :26.0.0-rust1.94.0-slim-trixie, | ||
| # or the :26.0.0 alias: | ||
| docker buildx imagetools inspect docker.io/stellar/stellar-cli:26.0.0 \ | ||
| --format '{{range .Manifest.Manifests}}{{if and .Platform (ne .Platform.OS "unknown")}}{{.Platform.OS}}/{{.Platform.Architecture}} {{.Digest}}{{println}}{{end}}{{end}}' | ||
| ``` | ||
|
|
||
| This prints one line per architecture, e.g.: | ||
|
|
||
| ``` | ||
| linux/amd64 sha256:… | ||
| linux/arm64 sha256:… | ||
| ``` | ||
|
|
||
| Record the `sha256:…` digest for the architecture you built on in your | ||
| contract's `bldimg` metadata — not the tag and not the manifest-list digest. A | ||
| verifier will pull that same per-arch image, run the same `docker run` | ||
| invocation, and compare the resulting WASM sha256. | ||
|
|
||
| ## Image Tags | ||
|
|
||
| - `latest` — most recent release. | ||
| - `X.Y.Z` — specific release version (e.g. `26.1.0`). | ||
| - `<X.Y.Z>-rust<rust image>` — multi-arch manifest list (e.g. | ||
| `26.1.0-rust1.95.0-slim-trixie`). | ||
| - `<X.Y.Z>-rust<rust image>-<arch>` — per-arch release (e.g. | ||
| `26.1.0-rust1.95.0-slim-trixie-arm64`). | ||
|
|
||
| ## Source | ||
|
|
||
| Built from | ||
| [stellar/stellar-cli-docker](https://github.com/stellar/stellar-cli-docker). | ||
|
|
||
| ## License | ||
|
|
||
| [Apache-2.0](https://github.com/stellar/stellar-cli-docker/blob/main/LICENSE). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.