Created
May 4, 2022 13:15
-
-
Save FilBot3/f1c1ab410ec22cd3d235430dc8902519 to your computer and use it in GitHub Desktop.
A trivial, simple example of how to use Buildah to build a Container Image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
container=$(buildah from docker.io/library/ubuntu) | |
buildah run ${container} -- sh -c "apt update && apt install --yes curl apt-transport-https ca-certificates" | |
buildah run ${container} -- sh -c "apt update && apt install --yes vim" | |
buildah config --entrypoint="/bin/bash" ${container} | |
buildah config --cmd="--login -i" ${container} | |
buildah commit ${container} localhost/ubuntu-vim:latest | |
buildah images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment