Skip to content

Commit 40cfb98

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 2d61d66 commit 40cfb98

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
flex \
10+
bison \
11+
make \
12+
curl \
13+
patch
14+
15+
16+
COPY . /app/ebmc
17+
WORKDIR /app/ebmc
18+
19+
# This Dockerfile assumes the submodule lib/cbmc is already checked out.
20+
RUN make -j$(nproc) -C lib/cbmc/src minisat2-download
21+
RUN make -j$(nproc) -C src
22+
23+
FROM ubuntu:24.04 AS runner
24+
COPY --from=builder /app/ebmc/src/ebmc/ebmc /usr/local/bin/
25+
ENTRYPOINT [ "ebmc" ]

0 commit comments

Comments
 (0)