Rebuild image with labels after finding the file; move example to example dir

This commit is contained in:
Joe
2021-04-28 20:49:41 -05:00
parent 4c420c3cf4
commit 273d457222
4 changed files with 35 additions and 5 deletions

4
example/Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM busybox
ADD testfile.txt .
RUN rm testfile.txt && mkdir app && echo "hello" > /app/othertestfile.txt

15
example/example.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
source=$(dirname "${BASH_SOURCE[0]}")
pushd "$source" &> /dev/null
# Build example image
docker build . -t test-image &> /dev/null
# Execute docker artifact to add a label to /app/othertestfile.txt
set +e
../docker-artifact.sh test-image /app/othertestfile.txt
popd &> /dev/null

1
example/testfile.txt Normal file
View File

@ -0,0 +1 @@
hi