lib/containers/container_images.pm

build_and_run_image

build_and_run_image($runtime, [$buildah], $dockerfile, $base, $builder_image);

Create a container using a dockerfile and check if the container can be accessed via http queries. The container must be accessible on http://localhost:8888 and return the string "The test shall pass". base is the image under test and is used as FROM in the final stage; the base only needs to provide printenv - no package manager, interpreter or particular glibc is required. A multi-stage build pulls a BCI golang builder image (registry.opensuse.org/opensuse/bci/golang:stable on openSUSE, registry.suse.com/bci/golang:stable otherwise) to compile a statically linked Go HTTP server, which is then copied into the final image together with index.html.

The main container runtimes do not need buildah variable in general, unless you want to build the image with buildah but run it with $<runtime>