Rebuild image with labels after finding the file; move example to example dir
This commit is contained in:
4
example/Dockerfile
Normal file
4
example/Dockerfile
Normal 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
15
example/example.sh
Executable 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
1
example/testfile.txt
Normal file
@ -0,0 +1 @@
|
||||
hi
|
Reference in New Issue
Block a user