docker-artifact/example/example.sh

14 lines
453 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2021-05-01 02:43:40 +00:00
pushd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null
# Build example image
echo "Rebuilding docker image for example"
2021-05-01 02:43:40 +00:00
printf 'FROM busybox \n RUN mkdir app && echo "Hello World!" > /app/testfile.txt' | docker build -t infogulch/artifact-test - &> /dev/null
2021-05-01 02:43:40 +00:00
# Execute docker artifact to add a label that identifies /app/testfile.txt
../docker-artifact.sh artifact label infogulch/artifact-test /app/testfile.txt
popd &> /dev/null