HUB
Sign inSign up
s3-sync-entrypoint logo

dceoy/s3-sync-entrypoint

By dceoy

•Updated almost 5 years ago

s3-sync-entrypoint

Image
0

2.1K

dceoy/s3-sync-entrypoint repository overview

⁠aws-s3-sync-entrypoint

Bash entrypoint to synchronize data with AWS S3 before and after command execution

CI to Docker Hub

⁠Installation

$ 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}

⁠Docker image

The image is available at Docker Hub⁠.

$ docker image pull dceoy/s3-sync-entrypoint

⁠Usage

  1. 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
    
  2. 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:

    1. Recursively copy s3://bucket-i/input0 and s3://bucket-i/input1 to /input (INPUT_DATA_DIR).
    2. Execute the command (cp -r /input/input0 /input/input1 /output/).
    3. Recursively copy /output (OUTPUT_DATA_DIR) to s3://bucket-o/output0.

Run s3-sync-entrypoint --help for more information.

Tag summary

Content type

Image

Digest

Size

152.5 MB

Last updated

almost 5 years ago

docker pull dceoy/s3-sync-entrypoint