Skip to content

Commit 34e6f97

Browse files
committed
Add a Dockerfile for building and running EBMC
This Dockerfile uses a two-stage build process similar to CBMC's Dockerfile: the binary is compiled in the first stage and then copied into another container in the second stage. The build step follows the instructions in COMPILING.md, with the assumption that the submodule lib/cbmc has already been checked out locally.
1 parent 2728d52 commit 34e6f97

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ubuntu:24.04 AS builder
2+
ENV DEBIAN_FRONTEND=noninteractive
3+
4+
RUN apt-get update
5+
RUN apt-get upgrade -y
6+
RUN apt-get install -y --no-install-recommends \
7+
g++ \
8+
gcc \
9+
git \
10+
flex \
11+
bison \
12+
make \
13+
curl \
14+
patch
15+
16+
17+
COPY . /app/ebmc
18+
WORKDIR /app/ebmc
19+
20+
# This Dockerfile assumes the submodule lib/cbmc is already checked out.
21+
RUN make -j$(nproc) -C lib/cbmc/src minisat2-download
22+
RUN make -j$(nproc) -C src
23+
24+
FROM ubuntu:24.04 AS runner
25+
COPY --from=builder /app/ebmc/src/ebmc/ebmc /usr/local/bin/
26+
ENTRYPOINT [ "ebmc" ]

0 commit comments

Comments
 (0)