From a69b96fe168a05792288ef2e186a86e6540f85bd Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Sun, 13 Jan 2019 20:16:37 -0700 Subject: Updating progress --- examples/example4/Dockerfile | 5 +++++ examples/example4/example4.sh | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 examples/example4/Dockerfile create mode 100755 examples/example4/example4.sh (limited to 'examples/example4') diff --git a/examples/example4/Dockerfile b/examples/example4/Dockerfile new file mode 100644 index 0000000..a13c3cc --- /dev/null +++ b/examples/example4/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3 + +RUN pip3 install babysploit + +WORKDIR /usr/src/app 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 $*" -- cgit v1.2.3