add repro.sh script w/ burnettk

This commit is contained in:
jasquat 2024-05-23 16:00:48 -04:00
parent 70c8e9fe15
commit 7c0bd381fe
No known key found for this signature in database
1 changed files with 18 additions and 0 deletions

18
repro.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
function error_handler() {
echo >&2 "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
exit "$2"
}
trap 'error_handler ${LINENO} $?' ERR
set -o errtrace -o errexit -o nounset -o pipefail
container_name=gunicornbrokenouchycontainer
if [[ -n "$(docker ps -a -q -f name=${container_name})" ]]; then
docker rm -f "$container_name"
fi
docker build . -t gunicornbrokenouchy
docker run -d --name "$container_name" -p 8000:8000 gunicornbrokenouchy
sleep 4
curl -H "SCRIPT_NAME: /api" http://localhost:8000/api/hello