Benutzer-Werkzeuge

Webseiten-Werkzeuge


buildah

CLI Tool für containerd

buildah run $(buildah from ubuntu) -- bash
 
buildah rm <container>
buildah rmi <image>
 
buildah images
 
# Image erstellen
buildah bud -t 192.168.1.2:30050/demo-php:v1 .
 
# Image ansehen
buildah inspect 192.168.1.2:30050/demo-php:v1
 
# In die Registry pushen
buildah push --tls-verify=false 192.168.1.2:30050/demo-php:v1
 
# Registry API
curl -k http://192.168.1.2:30050/v2/_catalog
{"repositories":["demo-php"]}
 
curl -k http://192.168.1.2:30050/v2/demo-php/tags/list
{"name":"demo-php","tags":["v1"]}
  • -t, –tty : allocate a pseudo-TTY (handy for interactive shells)
  • -e, –env KEY=VALUE : set env vars for this run only (non-persistent)
  • –workingdir DIR : set working directory for this run only
  • –user user[:group] : run as a specific user/group inside the container
  • –network, –net MODE : host, none, slirp4netns, etc.
  • –volume/-v HOST:CTR[:opts] : bind mount (SELinux relabel with :z/:Z)
  • –mount type=bind|tmpfs|cache|secret,… : more flexible mounts than -v
  • –cap-add/–cap-drop : tweak Linux capabilities
buildah.txt · Zuletzt geändert: 2025/11/27 18:06 von jango