13.2. Pushing a container artifact directly to a container registry
You can push container artifacts directly to a container registry after you build them by using the RHEL image builder CLI.
Prerequisites
-
Access to quay.io registry. This example uses the
quay.iocontainer registry as a target registry, but you can use a container registry of your choice.
Procedure
Set up a
registry-config.tomlfile to select the container provider. The credentials are optional.provider = "<container_provider>" [settings] tls_verify = false username = "<admin>" password = "<your_password>"Create a blueprint in the
.tomlformat. This is a blueprint for the container in which you install annginxpackage into the blueprint.name = "simple-container" description = "Simple RHEL container" version = "0.0.1" [[packages]] name = "nginx" version = "*"Build the container image, by passing the registry and the repository to the
image-buildertool as arguments.# image-builder build --blueprint <simple-container> --extra-repo "quay.io:8080/<namespace>/<repository>" --extra-repo registry-config.toml注意Building the container image takes time because of resolving dependencies of the customized packages.
- After the image build finishes, the container you created is available in quay.io.
Verification
Open quay.io. and click
Repository Tags. You can see details about the container you created, such as:- Last modified
- Image size
-
The
manifest IDthat you can copy to the clipboard.
-
Copy the
manifest IDvalue to build the image in which you want to embed a container.