-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (53 loc) · 1.74 KB
/
Dockerfile
File metadata and controls
75 lines (53 loc) · 1.74 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
FROM --platform=linux/amd64 rust:slim-bookworm AS builder
RUN apt-get update && apt-get install -y \
curl \
git \
python3 \
python3-pip \
python3-requests \
build-essential \
cmake \
pkg-config \
libssl-dev \
z3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
RUN git clone https://github.com/Beneficial-AI-Foundation/installers_for_various_tools.git installers
WORKDIR /build/installers
RUN echo "n" | python3 verus_installer_from_release.py
RUN echo "n" | python3 verus_analyzer_installer.py
RUN echo "n" | python3 scip_installer.py
WORKDIR /build
RUN git clone https://github.com/Beneficial-AI-Foundation/probe-verus.git
WORKDIR /build/probe-verus
RUN cargo install --path .
FROM --platform=linux/amd64 rust:slim-bookworm AS runtime
RUN apt-get update && apt-get install -y \
libssl3 \
z3 \
python3 \
python3-pip \
python3-requests \
&& rm -rf /var/lib/apt/lists/*
# Install specific Rust toolchain for Verus
RUN rustup toolchain install 1.93.0
# Ensure permissions for toolchain and tools
RUN chmod -R a+rx /usr/local/rustup /usr/local/cargo
RUN useradd -m -u 1000 tooluser
COPY --from=builder /usr/local/cargo/bin/probe-verus /usr/local/bin/probe-verus
# Copy verus
COPY --from=builder /root/verus /usr/local/verus
ENV PATH="/usr/local/verus:${PATH}"
# Copy verus-analyzer
COPY --from=builder /root/verus-analyzer /usr/local/verus-analyzer
ENV PATH="/usr/local/verus-analyzer:${PATH}"
# Copy scip
COPY --from=builder /root/scip /usr/local/scip
ENV PATH="/usr/local/scip:${PATH}"
# Ensure permissions for copied tools
RUN chmod -R a+rx /usr/local/verus /usr/local/verus-analyzer /usr/local/scip
# Setup workspace
WORKDIR /workspace
USER tooluser
# Entrypoint
ENTRYPOINT ["probe-verus"]