forked from pico-sol/solana-anchor-react-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (40 loc) · 1.41 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /app
COPY . .
#--- Update & Install Base Packages ---
RUN apt update
RUN apt install -y curl
RUN apt install -y iputils-ping
RUN apt install -y git
RUN apt install -y zsh
RUN apt install -y wget
RUN apt install -y pkg-config build-essential libudev-dev libssl-dev
RUN apt install -y clang
#--- Setup Rust ---
# Following arguments(sh -s -- -y) skip for prompt.
# [details] https://forge.rust-lang.org/infra/other-installation-methods.html#other-ways-to-install-rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Use ENV instead of source, export and dot command.
ENV PATH="/root/.cargo/bin:${PATH}"
RUN ["/bin/bash", "-c", "source $HOME/.cargo/env"]
RUN rustup component add rustfmt
#--- Install Solana ---
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.16.23/install)"
# Use ENV instead of source, export and dot command.
ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}"
#--- Install Node ---
RUN apt install -y nodejs
RUN apt install -y npm
RUN npm install -g n
RUN n latest
RUN ln -sf /usr/local/bin/node /usr/bin/node
RUN npm install -g yarn
# for "error:0308010C:digital envelope routines::unsupported" error
ENV NODE_OPTIONS=--openssl-legacy-provider
#--- Install Anchor ---
RUN npm i -g @project-serum/anchor-cli
RUN npm i -y mocha
#--- Install React ---
RUN npm install -g create-react-app
RUN cd /app