-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (30 loc) · 1.1 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
# Ubunutu base system
FROM --platform=linux/arm64/v8 arm64v8/ubuntu:latest
WORKDIR /root
ENV NODE_VERSION "12.22.7"
# Base system dependencies
RUN apt update && apt upgrade -y
# Build tools
RUN apt update && apt install -y nano git build-essential python3
RUN apt update && apt install -y libclang-dev libv4l-dev
# RUN apt install -y gcc-aarch64-linux-gnu
# curl
RUN apt install -y curl ca-certificates
ENV CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
# Rust
RUN curl -o rustup.sh --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
RUN chmod +x rustup.sh
RUN ./rustup.sh -y
ENV PATH "$PATH:/root/.cargo/bin"
RUN cargo --version
RUN rustc --version
# Node.js
RUN curl -O --proto '=https' --tlsv1.2 -sSf https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-arm64.tar.gz
RUN tar xzvf node-v${NODE_VERSION}-linux-arm64.tar.gz
RUN ln -s /root/node-v${NODE_VERSION}-linux-arm64 /opt/node-v${NODE_VERSION}
RUN ln -s /opt/node-v${NODE_VERSION} /opt/node
ENV PATH "$PATH:/opt/node/bin"
RUN npm -v
RUN node -v
# cargo config to fix huge memory leak during cargo install
COPY ./.cargo/config .cargo/config