1
0
intel-media-ffmpeg/scripts/build-dockerfile
James Ketrenos f31a7eedbe Added additional descriptions about the version envsubst
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2019-09-16 17:07:27 -07:00

43 lines
859 B
Bash
Executable File

#!/bin/bash
# Bring in the variables from SOLUTION file
#
export $(grep -v '^#' SOLUTION | xargs -d '\n')
export $(grep -v '^#' MANIFEST | xargs -d '\n')
# Remove the Dockerfile if it exists; should check
# if it is clean first, and abort if not.
#
[ -e Dockerfile ] && rm Dockerfile
for snippet in templates/*.in; do
cat << EOM >> Dockerfile
#
# Template $snippt begins here (from templates/${snippet})
#
EOM
envsubst < $snippet >> Dockerfile
done
cat << EOM >> Dockerfile
#
# Solution begins here (from Dockerfile.solution)
#
EOM
envsubst < Dockerfile.solution >> Dockerfile
docker build . -t $CONTAINER:agama-${AGAMA_VERSION}
cat << EOM
If the build looks good, you should commit the changes
to Dockerfile and tag it as agama-${AGAMA_VERSION}:
git commit -s -a -m "Build of agama-${AGAMA_VERSION}"
git tag -f agama-${AGAMA_VERSION}
EOM