Skip to content

Instantly share code, notes, and snippets.

@robbmanes
Last active January 18, 2023 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbmanes/43814475f0eaf3c6747dbd2fe013aac0 to your computer and use it in GitHub Desktop.
Save robbmanes/43814475f0eaf3c6747dbd2fe013aac0 to your computer and use it in GitHub Desktop.
Adds Infiniband support to Red Hat Support Tools container image
#!/bin/bash
# Builds infiniband support into the base RHEL support-tools image.
# Must be run from a subscribed RHEL host.
IMAGE_NAME="quay.io/robbmanes/support-tools-ib:latest"
function main() {
echo "Pulling latest support-tools container image..."
CONTAINER=$(buildah from registry.redhat.io/rhel8/support-tools)
echo "Made working container \"$CONTAINER\"."
echo "Installing Infiniband support..."
buildah run $CONTAINER /usr/bin/yum install infiniband-diags libibverbs libibverbs-utils -y
echo "Committing container \"$CONTAINER\" to image \"$IMAGE_NAME\"."
buildah commit $CONTAINER $IMAGE_NAME
echo "Pushing image..."
buildah push $IMAGE_NAME
echo "Image should have finished pushing. Run the image with:"
echo " $ podman container runlabel RUN $IMAGE_NAME"
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment