"Fossies" - the Fresh Open Source Software Archive

Member "buildah-1.23.1/demos/README.md" (28 Sep 2021, 3336 Bytes) of package /linux/misc/buildah-1.23.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "README.md": 1.21.4_vs_1.22.0.

buildah logo

Buildah Demos

The purpose of these demonstrations is twofold:

  1. To help automate some of the tutorial material so that Buildah newcomers can walk through some of the concepts.
  2. For Buildah enthusiasts and practitioners to use for demos at educational presentations - college classes, Meetups etc.

It is assumed that you have installed Buildah and Podman on your machine.

$ sudo yum -y install podman buildah

For the Docker compatibility demo you will also need to install Docker.

$ sudo yum -y install docker

Replace yum with dnf if required.

Building from scratch demo

filename: buildah-scratch-demo.sh

This demo builds a container image from scratch. The container is going to inject a bash shell script and therefore requires the installation of coreutils and bash.

Please make sure you have installed Buildah and Podman. Also this demo uses Quay.io to push the image to that registry when it is completed. If you are not logged in then it will fail at that step and finish. If you wish to login to Quay.io before running the demo, then it will push to your repository successfully.

$ sudo buildah login quay.io

There are several variables you will want to set that are listed at the top of the script. The name for the container image, your quay.io username, your name, and the Fedora release number:

demoimg=myshdemo
quayuser=UserNameHere
myname=YourNameHere
distrorelease=30
pkgmgr=dnf   # switch to yum if using yum

Buildah and Docker compatibility demo

filename: docker-compatibility-demo.sh

This demo builds an nginx container image using Buildah. It modifies the homepage and commits the image. The container is tested using podman run and then stopped. The Docker daemon is then started and the image is pushed to the Docker repository. The container is started using docker run and tested.

There are several variables you will want to set that are listed at the top of the script. The name for the container image, your quay.io username, your name, and the Fedora release number:

demoimg=dockercompatibilitydemo
quayuser=UsernameHere
myname=YourNameHear
distro=fedora
distrorelease=30
pkgmgr=dnf   # switch to yum if using yum

Buildah build using Docker demo

filename: docker-bud-demo.sh

This demo builds an nginx container image using Buildah with. Buildah's buildah-using-docker, or bud option, provides a mechanism for using existing Dockerfiles to build the container image. This image is the same as the image in the Docker compatibility demo (at time of creating this README). The container is tested using podman run and then stopped. The Docker daemon is then started and the image is pushed to the Docker repository. The container is started using docker run and tested.

There are several variables you will want to set that are listed at the top of the script. The name for the container image, your quay.io username, your name, and the Fedora release number:

demoimg=buildahbuddemo
quayuser=UsernameHere
myname=YourNameHear
distro=fedora
distrorelease=30
pkgmgr=dnf   # switch to yum if using yum