@@ -12,25 +12,19 @@ ENV PATH="${HOME}/.local/share/solana/install/active_release/bin:${PATH}"
1212ENV PATH="${HOME}/.nvm/versions/node/${NODE_VERSION}/bin:${PATH}"
1313
1414# Install base utilities.
15- RUN mkdir -p /workdir && mkdir -p /tmp && \
16- apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \
15+ RUN apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \
1716 build-essential git curl wget jq pkg-config python3-pip \
1817 libssl-dev libudev-dev
1918
2019# Install rust.
2120RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \
22- sh rustup.sh --default-toolchain none -y && \
23- rustup install ${RUSTC_VERSION#v} && \
24- rustup default ${RUSTC_VERSION#v} && \
21+ sh rustup.sh --default-toolchain ${RUSTC_VERSION#v} -y && \
2522 rustup component add rustfmt clippy
2623
2724# Install node / npm / yarn.
2825RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.40.1/install.sh | bash
2926ENV NVM_DIR="${HOME}/.nvm"
3027RUN . $NVM_DIR/nvm.sh && \
31- nvm install ${NODE_VERSION} && \
32- nvm use ${NODE_VERSION} && \
33- nvm alias default node && \
3428 npm install -g yarn
3529
3630# Install Solana tools.
@@ -40,10 +34,11 @@ RUN sh -c "$(curl -sSfL https://release.anza.xyz/${SOLANA_CLI}/install)"
4034RUN cargo install --git https://github.com/coral-xyz/anchor --tag ${ANCHOR_CLI} anchor-cli --locked
4135
4236# Build a dummy program to bootstrap the BPF SDK (doing this speeds up builds).
43- RUN mkdir -p /tmp && cd /tmp && anchor init dummy && cd dummy && (anchor build || true)
44- RUN rm -r /tmp/ dummy
37+ RUN anchor init dummy && cd dummy && (anchor build || true)
38+ RUN rm -r /dummy
4539
4640# Set up the working directory
41+ RUN mkdir /workdir
4742WORKDIR /workdir
4843
4944# Copy the entrypoint script
0 commit comments