Bash entrypoint to synchronize data with AWS S3 before and after command execution
$ git clone https://github.com/dceoy/aws-s3-sync-entrypoint.git
$ cp -a aws-s3-sync-entrypoint/s3-sync-entrypoint /path/to/bin # a path in ${PATH}
The image is available at Docker Hub.
$ docker image pull dceoy/s3-sync-entrypoint
Set local input and output directory paths as INPUT_DATA_DIR and OUTPUT_DATA_DIR.
$ export INPUT_DATA_DIR=/input
$ export OUTPUT_DATA_DIR=/output
Run a command.
$ s3-sync-entrypoint \
--input-s3=s3://bucket-i/input0 \
--input-s3=s3://bucket-i/input1 \
--output-s3=s3://bucket-o/output0 \
cp -r /input/input0 /input/input1 /output/
The above command works as follows:
s3://bucket-i/input0 and s3://bucket-i/input1 to /input (INPUT_DATA_DIR).cp -r /input/input0 /input/input1 /output/)./output (OUTPUT_DATA_DIR) to s3://bucket-o/output0.Run s3-sync-entrypoint --help for more information.
Content type
Image
Digest
Size
152.5 MB
Last updated
almost 5 years ago
docker pull dceoy/s3-sync-entrypoint