script for building fedora appc container
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
#!/bin/bash | |
# | |
# Download Fedora Docker base image from: | |
# https://getfedora.org/en/cloud/download/docker.html | |
# | |
set -e | |
version=0.1 | |
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 ocjtech.us/fedora24 | |
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