-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathDockerfile.c2rust
More file actions
45 lines (35 loc) · 1.14 KB
/
Dockerfile.c2rust
File metadata and controls
45 lines (35 loc) · 1.14 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
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386
RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
apt install -y -q \
build-essential \
clang \
cmake \
curl \
git \
libclang-dev \
libssl-dev \
llvm \
patchelf \
pkg-config \
python3.9 \
python3.9-venv \
zlib1g-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
# Install uv (required for c2rust-refactor build scripts)
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN mkdir -p /opt/compiler-explorer
# Add github public key to known_hosts, to enable interaction-less clone
RUN mkdir /root/.ssh \
&& touch /root/.ssh/known_hosts \
&& ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git clone https://github.com/compiler-explorer/infra /opt/compiler-explorer/infra
RUN cd /opt/compiler-explorer/infra && make ce
# the clang that c2rust will be built against and use
ENV CLANG=19.1.0
RUN /opt/compiler-explorer/infra/bin/ce_install install "clang $CLANG"
RUN mkdir -p /root
COPY c2rust /root/
COPY common.sh /root/
WORKDIR /root