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/04/03 03:58] – [Basics] rpjday | f30_buildah [2019/04/03 08:23] (current) – [Basics] rpjday | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| ===== Basics ===== | ===== Basics ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | * OCI containers/ | ||
| + | * OCI containers/ | ||
| '' | '' | ||
| Line 46: | Line 51: | ||
| </ | </ | ||
| - | ===== Simple example | + | ===== Build container from existing image ===== |
| Delete all existing containers and check: | Delete all existing containers and check: | ||
| Line 57: | Line 62: | ||
| </ | </ | ||
| - | Build from Fedora image and check: | + | Build from Fedora image and verify: |
| < | < | ||
| - | fc=$(buildah from fedora) | + | $ fc=$(buildah from fedora) |
| $ echo ${fc} | $ echo ${fc} | ||
| fedora-working-container | 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 | ||
| $ | $ | ||
| </ | </ | ||