Skip to content

Instantly share code, notes, and snippets.

Created August 20, 2016 17:35
What would you like to do?
script for building fedora appc container
# Download Fedora Docker base image from:
set -e
tmp1=`mktemp -d`
tmp2=`mktemp -d`
tarEnd() {
export EXIT=$?
rm -rf $tmp1 $tmp2 && exit $EXIT
trap tarEnd EXIT
tar --extract --file Fedora-Docker-Base-24-1.2.x86_64.tar.xz --directory $tmp1
tar --extract --file $tmp1/*/layer.tar --directory $tmp2
acbuild --debug begin $tmp2
acbuildEnd() {
export EXIT=$?
rm -rf $tmp1 $tmp2
acbuild --debug end && exit $EXIT
trap acbuildEnd EXIT
acbuild --debug set-name
acbuild --debug label add version ${version}
acbuild --debug run -- rpm --rebuilddb
acbuild --debug run -- dnf -y update --refresh
acbuild --debug run -- dnf clean all
acbuild --debug run -- rpm --rebuilddb
acbuild --debug run -- rm -f /etc/resolv.conf
acbuild --debug write --overwrite fedora24-${version}.aci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment