Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/config/solana.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,26 @@ resources:

Starship uses the following defaults for Solana chains:

- **Image**: `ghcr.io/hyperweb-io/starship/solana-agave:v2.3.4`
- **Image**: `ghcr.io/hyperweb-io/starship/solana-agave-noavx:v2.3.4`
- **Binary**: `solana-validator`
- **Home Directory**: `/root/.solana`

## Docker Desktop / Virtualization Compatibility

Starship uses a custom-built Solana image (`solana-agave-noavx`) that compiles Solana from source without AVX (Advanced Vector Extensions) requirements. This ensures compatibility with:

- Docker Desktop on macOS (including Apple Silicon)
- Virtualized environments that don't support AVX instructions
- Kubernetes clusters running on virtual nodes

The no-AVX image provides the same functionality as the standard image but with broader hardware compatibility. If you're running on bare metal with AVX support and want maximum performance, you can override the image:

```yaml
chains:
- id: solana
name: solana
image: ghcr.io/hyperweb-io/starship/solana-agave:v2.3.4 # Standard AVX-optimized image
```
- **Denomination**: `lamports` (base unit), `sol` (display unit)
- **HD Path**: `m/44'/501'/0'/0'`
- **Coin Type**: 501
Expand Down
51 changes: 51 additions & 0 deletions starship/docker/chains/Dockerfile.solana-noavx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Custom Dockerfile for Solana without AVX requirements
# This builds Solana from source to be compatible with Docker Desktop and virtualized environments

FROM rust:1.75-bullseye

LABEL org.opencontainers.image.source="https://github.com/hyperweb-io/starship"

# Set up dependencies
ENV PACKAGES curl make bash jq sed git build-essential pkg-config libssl-dev libudev-dev

# Install minimum necessary dependencies
RUN apt-get update --yes && \
apt-get install $PACKAGES --no-install-recommends --yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /root

ARG VERSION

# Clone and build Solana from source without AVX requirements
RUN git clone https://github.com/anza-xyz/agave.git /opt/agave && \
cd /opt/agave && \
git checkout ${VERSION} && \
# Set Rust flags to disable AVX and build for generic x86_64
# This prevents the runtime AVX check from aborting the process
export RUSTFLAGS="-C target-cpu=generic -C target-feature=-avx -C target-feature=-avx2" && \
# Build Solana without AVX optimizations
cargo build --release --bin agave-validator && \
cargo build --release --bin solana && \
cargo build --release --bin solana-keygen && \
cargo build --release --bin solana-faucet && \
cargo build --release --bin agave-ledger-tool && \
cargo build --release --bin solana-genesis && \
cargo build --release --bin solana-gossip && \
# Install binaries to /usr/local/bin
cp target/release/agave-validator /usr/local/bin/ && \
cp target/release/solana /usr/local/bin/ && \
cp target/release/solana-keygen /usr/local/bin/ && \
cp target/release/solana-faucet /usr/local/bin/ && \
cp target/release/agave-ledger-tool /usr/local/bin/ && \
cp target/release/solana-genesis /usr/local/bin/ && \
cp target/release/solana-gossip /usr/local/bin/ && \
# Clean up to reduce image size
cd / && rm -rf /opt/agave

# Verify installation
RUN solana --version && agave-validator --version

# Set the default command
CMD ["bash"]
6 changes: 6 additions & 0 deletions starship/docker/chains/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ chains:
- v2.3.3
- v2.2.20
- v2.2.19
- name: solana-agave-noavx
base: rust:1.75-bullseye
file: Dockerfile.solana-noavx
tags:
- v2.3.4
- v2.3.3
- name: ethereum/client-go
base: ethereum/client-go
file: Dockerfile.base
Expand Down
Loading