This repo is for creating an OCI compliant container image of the o-must-gather app found here: https://github.com/kxr/o-must-gather
Note: Currently using V1 of o-must-gather, since V2 is still work in progress.
This container image provides an environment to run the omg
command within this container.
Additionally this tool also allows to use the oc
command within the container. Just for convenience reasons.
If you run docker instead of podman just replace podman
with docker
in all the commands.
https://quay.io/repository/toughiq/omg
podman build -t quay.io/toughiq/omg:latest .
If you build locally, you can set the image name to your likings.
podman run -it --rm -v /path/to/must-gather.local.6450507246821680:/home/omg/must-gather:Z quay.io/toughiq/omg:latest
This inits the container with your desired must-gather directory and places you afterwards in the container and you can start doing your omg/oc work.
mkdir ${HOME}/.bashrc.d
cat << EOF > ${HOME}/.bashrc.d/omg.sh
#!/bin/bash
function omg() {
filename=$(readlink -f $1)
podman run -ti --rm -v "${filename}":/home/omg/must-gather:Z quay.io/toughiq/omg:latest
}
EOF
source ${HOME}/.bashrc.d/omg.sh
omg /PATH/TO/must-gather-directory
This inits the container with your desired must-gather directory and places you afterwards in the container and you can start doing your omg/oc work.