Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| f30_buildah [2019/03/30 15:09] – rpjday | f30_buildah [2019/04/03 08:23] (current) – [Basics] rpjday | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Basics ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | * OCI containers/ | ||
| + | * OCI containers/ | ||
| + | |||
| + | '' | ||
| + | |||
| + | * existing images | ||
| + | * scratch | ||
| + | * Dockerfiles | ||
| + | |||
| + | Available commands: | ||
| + | |||
| + | < | ||
| + | add Add content to the container | ||
| + | build-using-dockerfile Build an image using instructions in a Dockerfile | ||
| + | commit | ||
| + | config | ||
| + | containers | ||
| + | copy Copy content into the container | ||
| + | from | ||
| + | help Help about any command | ||
| + | images | ||
| + | info | ||
| + | inspect | ||
| + | mount Mount a working container' | ||
| + | pull Pull an image from the specified location | ||
| + | push Push an image to a specified destination | ||
| + | rename | ||
| + | rm | ||
| + | rmi Remove one or more images from local storage | ||
| + | run Run a command inside of the container | ||
| + | tag Add an additional name to a local image | ||
| + | umount | ||
| + | unshare | ||
| + | version | ||
| + | </ | ||
| + | |||
| + | ===== Build container from existing image ===== | ||
| + | |||
| + | Delete all existing containers and check: | ||
| + | |||
| + | < | ||
| + | $ buildah rm --all | ||
| + | $ buildah containers | ||
| + | CONTAINER ID BUILDER | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Build from Fedora image and verify: | ||
| + | |||
| + | < | ||
| + | $ fc=$(buildah from fedora) | ||
| + | $ echo ${fc} | ||
| + | fedora-working-container | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Run: | ||
| + | |||
| + | < | ||
| + | $ buildah run $fc bash | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | ===== Running command in container ===== | ||
| + | |||
| + | < | ||
| + | $ buildah run ${fc} cat / | ||
| + | </ | ||
| + | ===== Building containers from scratch ===== | ||
| + | |||
| + | < | ||
| + | $ sc=$(buildah from scratch) | ||
| + | $ buildah containers | ||
| + | CONTAINER ID BUILDER | ||
| + | 6935a1961a34 | ||
| + | 4dd92fc19b8a | ||
| + | $ | ||
| + | </ | ||