Skip to content

Commit a870f7f

Browse files
committed
docker: move to noble, include z3, bitwuzla
1 parent d07b2b1 commit a870f7f

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ You can get further information in the [`echidna` Homebrew Formula](https://form
203203
If you prefer to use a pre-built Docker container, check out our [docker
204204
package](https://github.com/orgs/crytic/packages?repo_name=echidna), which is
205205
auto-built via GitHub Actions. The `echidna` container is based on
206-
`ubuntu:focal` and it is meant to be a small yet flexible enough image to use
206+
`ubuntu:noble` and it is meant to be a small yet flexible enough image to use
207207
Echidna on. It provides a pre-built version of `echidna`, as well as
208208
`slither`, `crytic-compile`, `solc-select` and `nvm` under 200 MB.
209209

docker/Dockerfile

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:focal AS builder-echidna
1+
FROM ubuntu:noble AS builder-echidna
22
ENV LD_LIBRARY_PATH=/usr/local/lib PREFIX=/usr/local HOST_OS=Linux
33
RUN apt-get update && \
44
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends \
@@ -19,18 +19,44 @@ RUN .github/scripts/install-libff.sh
1919
RUN stack upgrade && stack setup && stack install --flag echidna:static --extra-include-dirs=/usr/local/include --extra-lib-dirs=/usr/local/lib
2020

2121

22-
FROM ubuntu:focal AS builder-python3
22+
FROM ubuntu:noble AS builder-python3
2323
RUN apt-get update && \
2424
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends \
2525
gcc \
26-
python3.8-dev \
27-
python3.8-venv
26+
python3 \
27+
python3.12-dev \
28+
python3.12-venv
2829
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
2930
ENV PIP_NO_CACHE_DIR=1
3031
RUN python3 -m venv /venv && /venv/bin/pip3 install --no-cache --upgrade setuptools pip
3132
RUN /venv/bin/pip3 install --no-cache slither-analyzer solc-select
3233

3334

35+
FROM ubuntu:noble AS builder-solvers
36+
RUN apt-get update && \
37+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends \
38+
unzip \
39+
ca-certificates \
40+
curl
41+
RUN mkdir /solvers/
42+
RUN if [ $(uname -m) = "aarch64" ]; then \
43+
curl -fsSL -o z3.zip https://github.com/Z3Prover/z3/releases/download/z3-4.15.2/z3-4.15.2-arm64-glibc-2.34.zip; \
44+
elif [ $(uname -m) = "x86_64" ]; then \
45+
curl -fsSL -o z3.zip https://github.com/Z3Prover/z3/releases/download/z3-4.15.2/z3-4.15.2-x64-glibc-2.39.zip; \
46+
fi && \
47+
unzip z3.zip && \
48+
cp -a z3-*/* /solvers/ && \
49+
rm -rf z3-*/ z3.zip
50+
RUN if [ $(uname -m) = "aarch64" ]; then \
51+
curl -fsSL -o bitwuzla.zip https://github.com/bitwuzla/bitwuzla/releases/download/0.8.2/Bitwuzla-Linux-arm64-static.zip; \
52+
elif [ $(uname -m) = "x86_64" ]; then \
53+
curl -fsSL -o bitwuzla.zip https://github.com/bitwuzla/bitwuzla/releases/download/0.8.2/Bitwuzla-Linux-x86_64-static.zip; \
54+
fi && \
55+
unzip bitwuzla.zip && \
56+
cp -a Bitwuzla-*/* /solvers/ && \
57+
rm -rf Bitwuzla-*/ bitwuzla.zip
58+
59+
3460
FROM gcr.io/distroless/python3-debian11:nonroot AS final-distroless
3561
COPY --from=builder-echidna /root/.local/bin/echidna /usr/local/bin/echidna
3662
COPY --from=builder-python3 /venv /venv
@@ -39,16 +65,16 @@ ENV PATH="$PATH:/venv/bin"
3965
ENTRYPOINT [ "/usr/local/bin/solc-install", "/usr/local/bin/echidna" ]
4066

4167

42-
FROM ubuntu:focal AS final-ubuntu
68+
FROM ubuntu:noble AS final-ubuntu
4369
RUN apt-get update && \
4470
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends \
4571
ca-certificates \
4672
curl \
4773
python3 \
48-
python3-distutils \
4974
&& \
5075
rm -rf /var/lib/apt/lists/*
5176
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
77+
COPY --from=builder-solvers /solvers/bin/z3 /solvers/bin/bitwuzla /usr/local/bin/
5278
COPY --from=builder-echidna /root/.local/bin/echidna /usr/local/bin/echidna
5379
RUN ln -s /usr/local/bin/echidna /usr/local/bin/echidna-test
5480
COPY --from=builder-python3 /venv /venv

0 commit comments

Comments
 (0)