Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
f30_buildah [2019/04/03 03:58] – [Basics] rpjdayf30_buildah [2019/04/03 08:23] (current) – [Basics] rpjday
Line 12: Line 12:
  
 ===== Basics ===== ===== Basics =====
 +
 +''buildah'' sits on top of:
 +
 +  * OCI containers/image project (copy, push, pull, inspect images)
 +  * OCI containers/storage project (store FS layers, images and containers)
  
 ''buildah'' can build images from any of: ''buildah'' can build images from any of:
Line 46: Line 51:
 </code> </code>
  
-===== Simple example =====+===== Build container from existing image =====
  
 Delete all existing containers and check: Delete all existing containers and check:
Line 57: Line 62:
 </code> </code>
  
-Build from Fedora image and check:+Build from Fedora image and verify:
  
 <code> <code>
-fc=$(buildah from fedora)+fc=$(buildah from fedora)
 $ echo ${fc} $ echo ${fc}
 fedora-working-container fedora-working-container
 +$
 +</code>
 +
 +Run:
 +
 +<code>
 +$ buildah run $fc bash
 +#
 +</code>
 +
 +===== Running command in container =====
 +
 +<code>
 +$ buildah run ${fc} cat /etc/os-release
 +</code>
 +===== Building containers from scratch =====
 +
 +<code>
 +$ sc=$(buildah from scratch)
 +$ buildah containers
 +CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
 +6935a1961a34         d09302f77cfc docker.io/library/fedora:latest  fedora-working-container
 +4dd92fc19b8a                      scratch                          working-container
 $ $
 </code> </code>
  • f30_buildah.1554263912.txt.gz
  • Last modified: 2019/04/03 03:58
  • by rpjday