-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (54 loc) · 1.67 KB
/
Copy pathDockerfile
File metadata and controls
77 lines (54 loc) · 1.67 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM solanafoundation/anchor:v0.31.1
RUN rustup toolchain uninstall stable && rustup toolchain install stable
RUN apt-get update && apt-get install -y wget curl
RUN wget https://golang.org/dl/go1.24.0.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz && \
rm go1.24.0.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
# Install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
RUN apt-get update && apt-get install -y \
build-essential \
pkg-config \
libudev-dev \
llvm \
libclang-dev \
protobuf-compiler \
libssl-dev \
libc6 \
ghdl \
openssl \
clang-15 \
mold \
unzip
# Install TypeScript globally
RUN npm install -g typescript
RUN curl -fsSL https://bun.sh/install | bash && \
mv /root/.bun/bin/bun /usr/local/bin/bun && \
chmod +x /usr/local/bin/bun
# Copy all files into /app folder
WORKDIR /app
COPY . .
# Copy the Python script into the image
COPY decode_base58.py /app/decode_base58.py
# Install Python and dependencies
RUN apt-get update && apt-get install -y python3 python3-pip && \
pip3 install base58
# Run the Python script as part of the build step
RUN python3 /app/decode_base58.py
# Download all dependencies and build project
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build ./cmd/main.go
WORKDIR /app/pkg/dependencies/typescript
RUN npm install
WORKDIR /app/pkg/dependencies/rust
RUN cargo fetch
RUN cargo build --bin main
WORKDIR /app/pkg/dependencies/anchor/code-exec
RUN anchor build
RUN cargo install sccache
RUN export RUSTC_WRAPPER=sccache
WORKDIR /app
# Run the application
CMD ["./main"]