Skip to content

Commit 7a81691

Browse files
podhrmicdc-mak
authored andcommitted
Update documentation for using docker, run a CI test for the docker images, and add a newer z3 package into the Ubuntu docker image (installed via opam)
1 parent 567038b commit 7a81691

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

.github/workflows/docker.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,16 @@ jobs:
8282
attests: type=sbom
8383
provenance: mode=max
8484
github-token: ${{ secrets.GITHUB_TOKEN }}
85+
86+
test-docker-images:
87+
runs-on: ubuntu-latest
88+
strategy:
89+
matrix:
90+
tag: [release, release-redhat]
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Run CN CI tests
95+
run: |
96+
docker pull ${{env.CERBERUS_IMAGE_ID}}:${{ matrix.tag }}
97+
docker run -v $PWD:/work ${{env.CERBERUS_IMAGE_ID}}:${{ matrix.tag }} tests/run-cn.sh

Dockerfile.ubuntu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN opam init --disable-sandboxing
1111
ADD . /opt/cerberus
1212
WORKDIR /opt/cerberus
1313
RUN opam install --deps-only ./cerberus-lib.opam ./cn.opam
14+
RUN opam install z3
1415

1516
RUN eval `opam env` \
1617
&& make install_cn

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,22 @@ See https://github.com/rems-project/cerberus/blob/master/backend/cn/README.md
183183
Docker image
184184
------------
185185

186+
A pre-build docker image with `cerberus` and `cn` can be downloaded with:
187+
188+
* For the Ubuntu 22.04 based image (recommended):
189+
```bash
190+
$ docker pull ghcr.io/rems-project/cerberus/cn:release
191+
```
192+
* For Redhat Ubi9 based image:
193+
```bash
194+
$ docker pull ghcr.io/rems-project/cerberus/cn:release-redhat
195+
```
196+
197+
For a local build, run:
186198
```bash
187-
$ make -f Makefile_docker
199+
$ docker build -t cn:release -f Dockerfile.ubuntu .
188200
```
189-
creates a Docker image than can be used for example with:
201+
which creates a Docker image than can be used for example with:
190202
```bash
191203
$ docker run --volume `PWD`:/data/ cerberus:0.1 tests/tcc/00_assignment.c --pp=core
192204
```

backend/cn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and their dependencies.
1818
Note: there is a [known bug with Z3 version
1919
4.8.13](https://github.com/rems-project/cerberus/issues/663) (the default on
2020
Ubuntu 22.04) so you may wish to install Z3 via opam later for a more
21-
up-to-date version. CVC5
21+
up-to-date version. Z3 that is provided in the docker images is sufficiently up-to-date.
2222

2323
2. Install the opam package manager for OCaml:
2424
https://ocaml.org/docs/installing-ocaml#install-opam.

0 commit comments

Comments
 (0)