Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker and documentation updates #709

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,16 @@ jobs:
attests: type=sbom
provenance: mode=max
github-token: ${{ secrets.GITHUB_TOKEN }}

test-docker-images:
runs-on: ubuntu-latest
strategy:
matrix:
tag: [release, release-redhat]
steps:
- uses: actions/checkout@v4

- name: Run CN CI tests
run: |
docker pull ${{env.CERBERUS_IMAGE_ID}}:${{ matrix.tag }}
docker run -v $PWD:/work ${{env.CERBERUS_IMAGE_ID}}:${{ matrix.tag }} tests/run-cn.sh
2 changes: 1 addition & 1 deletion Dockerfile.redhat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM redhat/ubi9:latest
FROM redhat/ubi9:9.4

# Install basic dependencies
RUN yum update -y && \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN opam init --disable-sandboxing
ADD . /opt/cerberus
WORKDIR /opt/cerberus
RUN opam install --deps-only ./cerberus-lib.opam ./cn.opam
RUN opam install z3

RUN eval `opam env` \
&& make install_cn
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,22 @@ See https://github.com/rems-project/cerberus/blob/master/backend/cn/README.md
Docker image
------------

A pre-build docker image with `cerberus` and `cn` can be downloaded with:

* For the Ubuntu 22.04 based image (recommended):
```bash
$ docker pull ghcr.io/rems-project/cerberus/cn:release
```
* For Redhat Ubi9 based image:
```bash
$ docker pull ghcr.io/rems-project/cerberus/cn:release-redhat
```

For a local build, run:
```bash
$ make -f Makefile_docker
$ docker build -t cn:release -f Dockerfile.ubuntu .
```
creates a Docker image than can be used for example with:
which creates a Docker image than can be used for example with:
```bash
$ docker run --volume `PWD`:/data/ cerberus:0.1 tests/tcc/00_assignment.c --pp=core
```
Expand Down
2 changes: 1 addition & 1 deletion backend/cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and their dependencies.
Note: there is a [known bug with Z3 version
4.8.13](https://github.com/rems-project/cerberus/issues/663) (the default on
Ubuntu 22.04) so you may wish to install Z3 via opam later for a more
up-to-date version. CVC5
up-to-date version. Z3 that is provided in the docker images is sufficiently up-to-date.

2. Install the opam package manager for OCaml:
https://ocaml.org/docs/installing-ocaml#install-opam.
Expand Down
Loading