Skip to content

Commit ccdeb2f

Browse files
authored
Update README for Docker deployment info (#1154)
1 parent 2cb60ce commit ccdeb2f

1 file changed

Lines changed: 36 additions & 6 deletions

File tree

README.adoc

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,50 @@ The provided Dockerfile can be used to build an image with the minimum dependenc
6161
The Dockerfile uses RockyLinux 8 on x86-64 as the base image.
6262
If you want to run tests that leverage proprietary tools, you need to provide your own installations and licenses (which are typically compatible with RockyLinux 8 on x86-64).
6363

64-
To build the Docker image:
64+
If you bring your own EDA tools, you may need to provide a bit of your own Python code that implements the plugin API for `verilog_runner.py`.
65+
If you want to use a tool that isn't already supported, update `//bazel:verilog.bzl`, implement a new verilog runner plugin, and reference your new tool in the appropriate Bazel test targets.
66+
Not all tests necessarily work with every tool.
67+
Refer to the `BUILD.bazel` files for specifics.
68+
69+
=== Using the Published Docker Image
70+
71+
Prebuilt `linux/amd64` images are published to the
72+
https://github.com/orgs/xlsynth/packages/container/package/bedrock-rtl[Bedrock-RTL package on GitHub Container Registry^].
73+
Each image has an immutable tag of the form `YYYY-MM-DD-<full-git-sha>`, where the date is the commit date in UTC.
74+
We intentionally do not publish a moving `latest` tag.
75+
76+
To use the latest image, open the package page linked above, copy the tag from the most recently published version, and run:
77+
78+
[source,shell]
79+
----
80+
docker pull ghcr.io/xlsynth/bedrock-rtl:<tag>
81+
docker run --rm -it -v "$(pwd)":/src -w /src ghcr.io/xlsynth/bedrock-rtl:<tag> /bin/bash
82+
----
83+
84+
The package is public, so pulling it does not require GitHub Container Registry authentication.
85+
Using an immutable tag makes local and CI environments reproducible; pull a newer tag from the package page when you want to update the toolchain.
86+
87+
=== Building the Docker Image Locally
88+
89+
To build the image from the checked-out Dockerfile instead:
6590

6691
[source,shell]
6792
----
6893
docker build --platform=linux/amd64 --tag=bedrock-rtl:${USER} .
69-
docker run -v $(pwd):/src -w /src bedrock-rtl:${USER} /bin/bash
94+
docker run --rm -it -v "$(pwd)":/src -w /src bedrock-rtl:${USER} /bin/bash
7095
----
7196

7297
Then once inside the container, try `bazel build //... && bazel test //fifo/sim/... --test_tag_filters=iverilog`.
7398

74-
If you bring your own EDA tools, you may need to provide a bit of your own Python code that implements the plugin API for `verilog_runner.py`.
75-
If you want to use a tool that isn't already supported, update `//bazel:verilog.bzl`, implement a new verilog runner plugin, and reference your new tool in the appropriate Bazel test targets.
76-
Not all tests necessarily work with every tool.
77-
Refer to the `BUILD.bazel` files for specifics.
99+
=== Deploying Docker Images
100+
101+
The `docker-image-build` job in `.github/workflows/ci.yml` builds the image for every pull request, push to `main`, and manual CI run.
102+
After that build succeeds, the `docker-image-publish` job deploys the image to `ghcr.io/xlsynth/bedrock-rtl` for pushes to `main` and manually dispatched CI runs.
103+
Pull requests build the image but do not publish it.
104+
105+
The publish job generates the immutable `YYYY-MM-DD-<full-git-sha>` tag, pushes the `linux/amd64` image, attaches BuildKit provenance, and publishes a signed GitHub artifact attestation for the image digest.
106+
Repository maintainers can deploy an image manually by opening the
107+
https://github.com/xlsynth/bedrock-rtl/actions/workflows/ci.yml[CI workflow^], selecting *Run workflow*, and choosing the Git ref to publish.
78108

79109
== Pre-Commit Hooks
80110

0 commit comments

Comments
 (0)