Skip to content
SethBodine edited this page Aug 5, 2024 · 18 revisions

Podman Install

MACOS

xcode-select --install  # Required
brew install podman     # Install Podman

Other OSs

See Podman Install Documentation for other OS information

Prepare Podman

podman machine init --now --cpus=4 --memory=4096 \
       --timezone $(curl https://ipapi.co/timezone) --disk-size 50 \
       # all args are optional, but a minimum of 4GB of RAM is recommended (Prowler 3 can crash with less)
podman machine start    # only use if --now wasn't used, can be used to start the VM at a later stage after a reboot

Note: Drive Mapping is not supported so podman cp ${container_id}:/[path to files within container] . is used to transfer files and folders before exiting the container as storage is NOT persistant.

Setup and run (fast)

tmp_fol=$(mktemp -d)
wget https://raw.githubusercontent.com/SethBodine/audit-tools/main/pm-init.sh -O ${tmp_fol}/pm-init.sh
bash ${tmp_fol}/pm-init.sh

Setup and run (manual)

The following command will complete the following

  1. Check for Image updates
  2. Clean-up any detached images
  3. Start the Container
  4. Connect into the container
  5. Stop the container once exited

Note: The container does not contain any persistant storage - you stop it, your data will be lost, so remember to copy it out.

podman rm audit-tools; \
podman pull ghcr.io/sethbodine/audit-tools && \
podman image prune -f && \
container_id=$(podman run -it -p 9194:9194 -p 9033:9033 -p 11666:11666 --rm --detach --name audit-tools ghcr.io/sethbodine/audit-tools /sbin/updatetools) && \
podman exec -it --user container ${container_id} /bin/bash && \
podman stop ${container_id}

Known issues

In the event that something fails, stop any running containers and execute the following, this may be due to historical container images.

podman system prune -a -f --filter "label=audit-tools"              # use this to clean-up stale container images

If you want to transfer out everything from /output witin the container to the current folder add the following above the bottom line of the command

podman cp ${container_id}:/output .

More reading can be found https://docs.podman.io/en/latest/markdown/podman-cp.1.html regarding podman cp