Skip to content

Commit

Permalink
update sh scripts && Dockerfile to use more modern solana/rust versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kstepanovdev committed Dec 6, 2024
1 parent cd2a712 commit ba1dee8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:1.83.0

RUN apt-get update && apt install -y git curl
RUN apt-get update && apt install -y git curl protobuf-compiler

WORKDIR /app

Expand Down
8 changes: 4 additions & 4 deletions Solana.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SOLANA_VERSION=v1.18.11
ARG SOLANA_VERSION=v2.0.15
ARG RUST_VERSION=1.83.0
FROM rust:$RUST_VERSION-bullseye as builder
RUN apt-get update \
Expand All @@ -12,8 +12,8 @@ RUN apt-get update \
linux-headers-generic \
pkg-config \
curl \
cmake \
protobuf-compiler
cmake \
protobuf-compiler \

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
Expand All @@ -26,7 +26,7 @@ COPY Cargo.lock /rust/
WORKDIR /rust
RUN cargo build --release

FROM solanalabs/solana:$SOLANA_VERSION
FROM anzaxyz/agave:$SOLANA_VERSION
COPY --from=builder /rust/target/release/libplerkle.so /plugin/plugin.so
COPY ./docker .
RUN chmod +x ./*.sh
Expand Down
13 changes: 6 additions & 7 deletions ci/rust-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,20 @@
if [[ -n $RUST_VERSION ]]; then
stable_version="$RUST_VERSION"
else
stable_version=1.69.0
stable_version=latest
fi

if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2022-04-01
nightly_version=latest
fi


export rust_stable="$stable_version"
export rust_stable_docker_image=solanalabs/rust:"$stable_version"
export rust_stable_docker_image=rust:"$stable_version"

export rust_nightly=nightly-"$nightly_version"
export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
export rust_nightly_docker_image=shepmaster/rust-nightly:"$nightly_version"

[[ -z $1 ]] || (
rustup_install() {
Expand All @@ -56,11 +55,11 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
rustup_install "$rust_stable"
;;
nightly)
rustup_install "$rust_nightly"
rustup_install "nightly"
;;
all)
rustup_install "$rust_stable"
rustup_install "$rust_nightly"
rustup_install "nightly"
;;
*)
echo "$0: Note: ignoring unknown argument: $1" >&2
Expand Down

0 comments on commit ba1dee8

Please sign in to comment.