diff options
author | Cody Hiar <codyfh@gmail.com> | 2019-01-13 20:16:37 -0700 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2019-01-13 20:16:37 -0700 |
commit | a69b96fe168a05792288ef2e186a86e6540f85bd (patch) | |
tree | 6641019251857ec2dd888a948415b51b552964b6 /examples/example4/example4.sh | |
parent | 8f7de74cd6fb4317771586c65b43f8a6e4d85f26 (diff) |
Updating progress
Diffstat (limited to 'examples/example4/example4.sh')
-rwxr-xr-x | examples/example4/example4.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/example4/example4.sh b/examples/example4/example4.sh new file mode 100755 index 0000000..3029c59 --- /dev/null +++ b/examples/example4/example4.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# vim: set filetype=sh +# +# Author: Cody Hiar +# Date: 2019-01-15 +# +# Description: Show how to build image, then run +# it. +# +# Set options: +# e: Stop script if command fails +# u: Stop script if unset variable is referenced +# x: Debug, print commands as they are executed +# o pipefail: If any command in a pipeline fails it all fails +# +set -exuo pipefail + +# Build the image +docker build -t baby_sploit . + +# Run the image +docker run --rm -it -v "$(pwd)":/usr/src/app baby_sploit /bin/bash -c "babysploit $*" |