2016-03-10 09:01:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-03-10 18:18:11 +01:00
|
|
|
dest=$1
|
2016-03-10 09:01:02 +01:00
|
|
|
|
2016-03-10 18:18:11 +01:00
|
|
|
if [ -z "$dest" ]; then
|
|
|
|
echo "usage: $0 </full/path/to/dest>"
|
2016-03-10 09:01:02 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-03-10 17:40:41 +01:00
|
|
|
json=$(cat config.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 \
|
2016-03-10 18:18:11 +01:00
|
|
|
-v $dest:/tmp/output \
|
2016-03-10 09:20:05 +01:00
|
|
|
18fgsa/s3-resource-simple \
|
2016-03-10 18:18:11 +01:00
|
|
|
/opt/resource/in /tmp/output
|