Usage#
This guide explains how to build and run Ryzer containers using the Python calls.
Building a Docker Image with Ryzers#
To build a Docker image for a specific package, use the following command:
ryzers build <package_name>
ryzers build --name <imagename> <package_name>
For example, to build the genesis package:
ryzers build genesis
ryzers build --name myimage genesis
Running a Docker Image with Ryzers#
ryzers run # Runs the last built image
ryzers run --name <imagename> # Runs the imagename image
ryzers run bash # Runs the last build image with "bash" command
ryzers run --name <imagename> bash # Runs the imagename image with "bash" command
ryzers build#
The ryzers build command is a Python entry point that simplifies the process of building Docker images on AMD platforms. It takes the name of a package as an argument, locates the corresponding Dockerfile, and builds the image using the specified base image and config.yaml configuration.
How It Works#
When you run ryzers build, the command:
Reads the
config.yamlfile for the specified package to determine build arguments, environment variables, and dependencies.Uses the
Dockerfileassociated with the package to build the image.Tags the resulting Docker image with the package name for easy reference.
Generates a run script that can be called independently or with the
ryzers runcall below. This script includes all the run flags required to call the Docker image.
ryzers run#
The ryzers run command is another Python entry point that simplifies running Docker containers. It takes the name of a package as an argument and starts a container based on the previously built image. AMD specific docker run flags are generated based on config.yaml entries. You can also pass an optional command to override the default behavior of the container.
How It Works#
When you run ryzers run, the command:
Finds the correct run script generated by
ryzers buildand calls it. If no package name is given, the last built ryzer package is used.Optionally allows you to override the default command specified in the
Dockerfile.