Computer Tips - Podman: Selected commands from the tutorial video called "Podman: A Linux tool for working with containers and pods"

Date: 2022apr25 OS: Linux Language: bash Keywords: podman, docker Q. Podman: Selected commands from the tutorial video called "Podman: A Linux tool for working with containers and pods" https://www.youtube.com/watch?v=bJDI_QuXeCE A. I changed 'yum' to 'dnf' As root... Install podman
dnf -y install podman
Optionally make an alias
alias docker=podman
Show the version
podman -v
Show info about the container environment
podman info
Source for a container - put this in a text file called Dockerfile in a new directory and build with the command below or the command to download is shown below
FROM registry.centos.org/che-stacks/centos-stack-base WORKDIR /usr/src/open-adventure COPY ./open-adventure /usr/src/open-adventure RUN dnf -y update && \ dnf -y install kernel-headers && \ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org && \ rpm -Uvh http://elrepo.org/linux/kernel/el7/x86_64/RPMS/elrepo-release-7.0-5.el7.elrepo.noarch.rpm && \ rpm --enablerepro=elrepo-kernel -y install kernel-ml && \ rpm --enablerepro=elrepo-kernel -y swap kernel-headers -- kernel-ml-headers && \ dnf -y install centos-release-scl && \ dnf install git && \ dnf install gcc && \ dnf install libedit-devel && \ dnf install python-yaml && \ dnf install make && \ make
Build a container from a text file
podman build -t open-adventure:podman .
Show installed images
podman images
Run a local image
podman run --rm -it open-adventure:podman /bin/bash
Run his image
podman run -it quay.io/dougtidwell/open-adventure:podman /bin/bash
List running containers
podman ps
Run that game once inside the containers
./advent