Skip to content

Commit

Permalink
fix: Adjust Dockerfiles to the latest Light Protocol state
Browse files Browse the repository at this point in the history
* Stop using the irrelevant `install.sh` script.
* Don't download Light Protocol `*.so` files manually, Light CLI
  should do it during the runtime. Same with account jsons.
* Install typscript and typescript LSP server, just to ensure
  that codspaces are going to work.
  • Loading branch information
vadorovsky committed Nov 1, 2023
1 parent c7ca04d commit cdbab0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
17 changes: 3 additions & 14 deletions devcontainer-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,12 @@ WORKDIR /home/node

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/home/node/.cargo/bin:${PATH}"
RUN rustup toolchain install nightly

RUN curl -s \
https://raw.githubusercontent.com/Lightprotocol/install/main/light-protocol-install.sh | \
bash -s -- --no-prompt

RUN echo "PATH=\"/home/node/.cargo/bin:\$PATH\"" >> /home/node/.bashrc
RUN echo "PATH=\"/home/node/.local/light-protocol/bin:\$PATH\"" >> /home/node/.bashrc
RUN echo "PATH=\"\$(yarn global bin):\$PATH\"" >> \
/home/node/.bashrc

ARG NOOP_PROGRAM_VERSION=0.1.3

RUN mkdir -p /home/node/.local/light-protocol/lib/solana-program-library
RUN curl -L \
-o /home/node/.local/light-protocol/lib/solana-program-library/spl_noop.so \
https://github.com/Lightprotocol/solana-program-library/releases/download/noop-${NOOP_PROGRAM_VERSION}/spl_noop.so
RUN yarn global add \
typescript \
typescript-language-server

# To ensure that the `/home/node/.config/solana` volume is going to be owned by
# the `node` user. Otherwise it'd be owned by root.
Expand Down
10 changes: 0 additions & 10 deletions devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ USER node

RUN yarn global add @lightprotocol/cli

RUN curl -s \
https://raw.githubusercontent.com/Lightprotocol/install/main/light-protocol-install.sh | \
bash -s -- --no-prompt --skip-toolchain

RUN mkdir -p /home/node/.local/light-protocol/lib/accounts
WORKDIR /home/node/.local/light-protocol/lib/accounts
RUN curl -s https://api.github.com/repos/Lightprotocol/accounts/contents/ | \
jq -r '.[] | select(.name|test(".json$")) | .download_url' | \
while read url; do curl -O "$url"; done

WORKDIR /home/node

ENTRYPOINT []

0 comments on commit cdbab0c

Please sign in to comment.