Files
matchbox/build-aci
2016-01-30 15:13:37 -08:00

32 lines
713 B
Bash
Executable File

#!/usr/bin/env bash
set -e
GIT_SHA=$(./git-version)
# Start with an empty ACI
acbuild --debug begin
# In the event of the script exiting, end the build
trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT
# Name the ACI
acbuild --debug set-name coreos.com/bootcfg
# Add a version label
acbuild --debug label add version $GIT_SHA
# Add alpine base dependency
acbuild --debug dep add quay.io/coreos/alpine-sh
# Copy the static binary
acbuild --debug copy bin/bootcfg /bootcfg
# Add a port for HTTP traffic
acbuild --debug port add www tcp 8080
# Set the exec command
acbuild --debug set-exec -- /bootcfg
# Save and overwrite any older bootcfg ACI
acbuild --debug write --overwrite bootcfg.aci