2016-03-10 09:01:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
source=$1
|
|
|
|
|
2016-03-10 16:57:12 +01:00
|
|
|
if [ -z "$source" ]; then
|
|
|
|
echo "usage: $0 </full/path/to/dir/or/file>"
|
2016-03-10 09:01:02 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-03-10 16:57:12 +01:00
|
|
|
json=$(cat .env.json)
|
2016-03-10 09:01:02 +01:00
|
|
|
|
2016-03-10 16:57:12 +01:00
|
|
|
docker build -t 18fgsa/s3-resource-simple .
|
2016-03-10 09:57:41 +01:00
|
|
|
|
|
|
|
echo $json | docker run \
|
|
|
|
-i \
|
2016-03-10 09:01:02 +01:00
|
|
|
--rm \
|
|
|
|
-v $source:/tmp/input \
|
2016-03-10 09:20:05 +01:00
|
|
|
18fgsa/s3-resource-simple \
|
2016-03-10 09:01:02 +01:00
|
|
|
/opt/resource/out /tmp/input
|