-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
29 changes: 25 additions & 4 deletions
29
packages/aws-copy-out-sharer/construct/rclone-batch-copy-docker-image/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
FROM golang:1.21-alpine as builder | ||
|
||
# git is needed for go mod download to work | ||
RUN apk add --no-cache git | ||
|
||
WORKDIR /build | ||
|
||
RUN go env -w GOPROXY=direct | ||
|
||
ADD go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
ADD *.go ./ | ||
|
||
RUN env GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build rclone-batch.go | ||
|
||
|
||
FROM rclone/rclone:1.64.2 | ||
|
||
RUN apk add --no-cache aws-cli tini | ||
# if we want signals to propogate through to the app we need a lightweight initd | ||
RUN apk add --no-cache tini | ||
|
||
# this is where rclone binary ends up by default so we will do our work there | ||
WORKDIR /data | ||
|
||
# a shell script that allows us to take more batch like input to rclone | ||
COPY rclone-batch-copy.sh /app/ | ||
COPY --from=builder /build/rclone-batch ./ | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/rclone-batch-copy.sh"] | ||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/rclone-batch"] |
8 changes: 8 additions & 0 deletions
8
packages/aws-copy-out-sharer/construct/rclone-batch-copy-docker-image/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# rclone-batch | ||
|
||
`rclone-batch` is a Go wrapper around the invocation of `rclone`. Why do we need | ||
a wrapper? Well we want to get the statistics output of `rclone` in a way | ||
that we can standardise. Also, we want optionally to be able to send this info | ||
back to the parent AWS ECS task. Furthermore, there are aspects of signal | ||
handling that we want to support for AWS Spot that is not quite the same as | ||
`rclone` out of the box. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/aws-copy-out-sharer/construct/rclone-batch-shell-copy-docker-image/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM rclone/rclone:1.64.2 | ||
|
||
RUN apk add --no-cache aws-cli tini | ||
|
||
# a shell script that allows us to take more batch like input to rclone | ||
COPY rclone-batch-copy.sh /app/ | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/rclone-batch-copy.sh"] |
File renamed without changes.
28 changes: 0 additions & 28 deletions
28
packages/aws-copy-out-sharer/construct/rclone-go-batch-copy-docker-image/Dockerfile
This file was deleted.
Oops, something went wrong.