-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathDockerfile.build
More file actions
44 lines (36 loc) · 1.32 KB
/
Dockerfile.build
File metadata and controls
44 lines (36 loc) · 1.32 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
FROM ghcr.io/foundry-rs/foundry:v1.5.1 AS foundry
FROM ubuntu:22.04
ENV HOME=/root
# Configure aarch64 cross-compilation (only affects aarch64 target builds)
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
ENV CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
ENV CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
ENV AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar
WORKDIR /project
# Install build essentials and cross-compilation tools
RUN apt-get update && apt-get install -y \
build-essential \
curl \
gcc \
g++ \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
libssl-dev \
pkg-config \
ca-certificates \
unzip \
libclang-dev \
clang \
&& rm -rf /var/lib/apt/lists/*
# Copy forge from foundry image (Ubuntu 22.04 has glibc 2.35)
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
# Install Node.js 18.x and Yarn
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& apt-get clean
# Install Protobuf compiler v3
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip \
&& unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local \
&& chmod +x /usr/local/bin/protoc \
&& rm protoc-3.15.8-linux-x86_64.zip