Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

docker

This directory contains all of the repositories' dockerfiles as well as the bake file used to define this repository's docker build configuration. In addition, the recipes directory contains example deployment strategies + grafana dashboards for applications such as kona-node.

Install Dependencies

Building Locally

To build any image in the bake file locally, use docker buildx bake:

# The target is one of the available bake targets within the `docker-bake.hcl`.
# A list can be viewed by running `docker buildx bake --list-targets`
export TARGET="<target_name>"

(cd "$(git rev-parse --show-toplevel)" && docker buildx bake \
  --progress plain \
  -f docker/docker-bake.hcl \
  $TARGET)

Build Options

Relevant build options (variables) for each target can be viewed by running docker buildx bake --list-variables or manually inspecting the targets in the docker-bake.hcl.

Troubleshooting

If you receive an error like the following:

ERROR: Multi-platform build is not supported for the docker driver.
Switch to a different driver, or turn on the containerd image store, and try again.
Learn more at https://docs.docker.com/go/build-multi-platform/

Create and activate a new builder and retry the bake command.

docker buildx create --name kona-builder --use

Nightly Builds

Nightly Docker images are automatically built and published every day at 2 AM UTC for:

  • kona-node
  • kona-host
  • kona-supervisor

Using Nightly Images

# Pull the latest nightly build (multi-platform: linux/amd64, linux/arm64)
docker pull ghcr.io/op-rs/kona/kona-node:nightly
docker pull ghcr.io/op-rs/kona/kona-host:nightly
docker pull ghcr.io/op-rs/kona/kona-supervisor:nightly

# Pull a specific date's nightly build
docker pull ghcr.io/op-rs/kona/kona-node:nightly-2024-12-10

Manual Trigger

To manually trigger a nightly build:

gh workflow run "Build and Publish Nightly Docker Images"

Cutting a Release (for maintainers / forks)

To cut a release of the docker image for any of the targets, cut a new annotated tag for the target like so:

# Example formats:
# - `kona-host/v0.1.0-beta.8`
# - `cannon-builder/v1.2.0`
TAG="<target_name>/<version>"
git tag -a $TAG -m "<tag description>" && git push origin tag $TAG

To run the workflow manually, navigate over to the "Build and Publish Docker Image" action. From there, run a workflow_dispatch trigger, select the tag you just pushed, and then finally select the image to release.

Or, if you prefer to use the gh CLI, you can run:

gh workflow run "Build and Publish Docker Image" --ref <tag> -f image_to_release=<target>