diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e731bab5c..000000000 --- a/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM rust:latest - -RUN rustup target add wasm32v1-none - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential \ - ca-certificates \ - git \ - libdbus-1-dev \ - libssl-dev \ - libudev-dev \ - pkg-config && \ - rm -rf /var/lib/apt/lists/* - -ARG STELLAR_CLI_REV -RUN cargo install --locked \ - --git https://github.com/stellar/stellar-cli.git \ - --rev "${STELLAR_CLI_REV}" \ - stellar-cli - -ENV STELLAR_CONFIG_HOME=/config -ENV STELLAR_DATA_HOME=/data -ENV STELLAR_NO_UPDATE_CHECK=1 - -COPY entrypoint.sh /usr/local/bin/entrypoint.sh - -WORKDIR /source - -ENTRYPOINT ["/usr/local/bin/entrypoint.sh", "stellar"] -CMD [] diff --git a/README.md b/README.md index 5516c0f73..19b689cbb 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,14 @@ Use GitHub Action: uses: stellar/stellar-cli@v23.0.1 ``` +Run with Docker: + +```sh +docker run --rm -it -v "$(pwd)":/source stellar/stellar-cli version +``` + +Docker image distribution is handled by the [stellar/stellar-cli-docker](https://github.com/stellar/stellar-cli-docker) repository, with images published to [Docker Hub](https://hub.docker.com/r/stellar/stellar-cli/). + ## Autocomplete The Stellar CLI supports some autocompletion. To set up, run the following commands: diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 871a607e4..000000000 --- a/docker/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Stellar CLI - -Command-line interface for building and deploying smart contracts on the [Stellar](https://stellar.org) network. - -For full documentation, visit [https://developers.stellar.org](https://developers.stellar.org). - -## Quick Start - -```sh -docker run --rm -it -v "$(pwd)":/source stellar/stellar-cli version -``` - -## Usage - -The container expects your project files to be mounted at `/source` (the default working directory). Any `stellar` subcommand can be passed directly: - -```sh -# Build a contract -docker run --rm -it -v "$(pwd)":/source stellar/stellar-cli contract build - -# Deploy a contract -docker run --rm -it \ - -v "$(pwd)":/source \ - -e STELLAR_RPC_URL=https://soroban-testnet.stellar.org:443 \ - -e STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015" \ - stellar/stellar-cli contract deploy --wasm target/wasm32v1-none/release/my_contract.wasm --source -``` - -### Persisting Configuration - -Configuration and data are stored inside the container by default and lost when it exits. Mount volumes to keep them across runs: - -```sh -docker run --rm -it \ - -v "$(pwd)":/source \ - -v stellar-config:/config \ - -v stellar-data:/data \ - stellar/stellar-cli contract build -``` - -### Secure Store Keys - -The image does not include a system keyring, so `stellar keys` operations using `--secure-store` are not supported inside the container. Use file-based keys (the default) instead. - -## Container Paths - -| Path | Description | -| --- | --- | -| `/source` | Working directory where project files should be mounted. | -| `/config` | CLI configuration directory (`STELLAR_CONFIG_HOME`). Mount a volume to persist networks and keys across runs. | -| `/data` | CLI data directory (`STELLAR_DATA_HOME`). Mount a volume to persist cached contract specs and data. | - -## Image Tags - -- `latest` — most recent release. -- `X.Y.Z` — specific release version (e.g. `22.6.0`). -- `` — build from a specific commit. diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index ea040f9d2..000000000 --- a/entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -if ! rustup target add wasm32v1-none; then - echo "warning: failed to install rust target wasm32v1-none; continuing so non-build commands can still run" >&2 -fi -exec "$@"