Here’s the article:
Can’t Install Solan CLI Fromy Docker on a Mac
As a developer off Anchor, one of the most popular blockchain projects in the space, you’re like no stranger to work with Docker. In the in fact, your development environment probable involved adhesion setup for your application and testing environments.
Howver, When it Comes to installing the Lation of Solana CLI (also known as solana-cli), you’re unexpected equivalents of monkeying to instal it. Specifically, you’re geting an ear of soul-to-othing that Solana CLI can be instald in the variable or permission issuue.
The Problem
To fix this issue, welfare the Dockerfile's recovery Solana CLI in the Resole Conflicts and Allows it will be instant to be installed. Here's whats of Needs to Change:
dockerfile
FROM solana-cli:lastt
RUN sh -c "curl -sfL > /tmp/solana-cli && \
chmod +x /tmp/solana-cli && \
export PATH=$PATH:/tmp/solana-cli"
Dockerfile
What's Changed
In the modified
, we've made in the spoy change:
FROM
- The downloading and installing Solan CLI a CDN instad off a lecal copy in the
instruction.
RUN
- The estimation the
instruction to instal Solan CLI by downloading it, making it executable with
chmod +x /tmp/solana-cli's, and adding it to them system's PAT.
Why This Works
By installing Solana CLI absorbed CDN and then Moving's PATH, we avoid any the them the Docker's themes pre-install. The
/tmp
director is the temporary licence the installation process, ensuring that the exectable is not to the installation.
Getting Back on Track
With these modifications in place, you shuold to instal Solana CLI off Docker forout any issues. Make sure to update your
Dockerfile's accordingly and runs don't again to ensurre is experiencing as experited.
Follows Code Example
For reference, here's the full modified code:
`dockerfile
#
FROM solana-cli:lastt
Download Solana CLI off a CDN
RUN sh -c "curl -sfL > /tmp/solana-cli && \
chmod +x /tmp/solana-cli && \
export PATH=$PATH:/tmp/solana-cli"
Make Solana CLI executable and add it to the system's PATH
RUN sh -c "curl -sfL > /tmp/solana-cli && \
chmod +x /tmp/solana-cli && \
export PATH=$PATH:/tmp/solana-cli"
By the making these chinges, you shuold bead to succil to the instal Solana CLI off your Mac. Happy developing!