Skip to content

Instantly share code, notes, and snippets.

@carlwgeorge
Created May 9, 2022 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlwgeorge/c85b8105cb57ea37db363ffc5ccd0c2c to your computer and use it in GitHub Desktop.
Save carlwgeorge/c85b8105cb57ea37db363ffc5ccd0c2c to your computer and use it in GitHub Desktop.
buildah script to create pandoc cli container
#!/usr/bin/bash
set -eu
buildah unshare << EOF
set -eu
ctr=\$(buildah from scratch)
mnt=\$(buildah mount \$ctr)
dnf \
--releasever 35 \
--disablerepo '*' \
--enablerepo fedora,updates \
--installroot \$mnt \
--setopt 'tsflags=nodocs' \
--setopt 'install_weak_deps=false' \
--assumeyes \
install coreutils-single glibc-minimal-langpack pandoc
dnf --installroot \$mnt clean all
rm -rf \$mnt/var/cache/dnf
buildah config --entrypoint '["/usr/bin/pandoc"]' \$ctr
buildah unmount \$ctr
buildah commit \$ctr localhost/pandoc
buildah rm \$ctr
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment