HUB
Sign inSign up
rclone logo

swaleio/rclone

By swaleio

•Updated 9 days ago

rclone with credential mapping for Swale workflows. Backs the rclone-copy task.

Image
0

623

swaleio/rclone repository overview

⁠swaleio/rclone

A thin wrapper around rclone⁠ that backs the rclone-copy task. It configures a single rclone remote named remote from task inputs and runs rclone copy <source> <dest>.

⁠The remote model

This image never reads an on-disk rclone config. Instead it maps task inputs to rclone's RCLONE_CONFIG_<REMOTE>_<OPTION> environment variables for one remote whose name is always the literal string remote. Every path you hand the task is therefore written in rclone's remote:path form:

remote:my-bucket/data/          # "remote" == the backend configured from your inputs

The backend behind remote is selected by the remote_type input (default s3). Credentials come from the recognized credential inputs below and are exported only when set, so an unset input never overrides a backend's own default. No eval is used and no config file is written.

To move data in or out of the shared workspace, use a local path such as /mnt/workspace/out on one side of the copy:

source: remote:my-bucket/data     dest: /mnt/workspace/out     # download
source: /mnt/workspace/build      dest: remote:my-bucket/rel   # upload

⁠Supported remote_type values

remote_typeBackendCredential inputs it uses
s3 (default)AWS S3 and S3-compatible stores (Cloudflare R2, MinIO, DigitalOcean Spaces, Wasabi)access_key_id, secret_access_key, endpoint
b2Backblaze B2account, key
azureblobAzure Blob Storageaccount, key

Other rclone backends that authenticate with a single OAuth token can be named directly (e.g. remote_type: dropbox) and supplied through the token input.

⁠Recognized credential inputs

Each input, when set, is exported as the matching remote-config variable:

Inputrclone config keyEnv var exported
remote_typetypeRCLONE_CONFIG_REMOTE_TYPE
access_key_idaccess_key_idRCLONE_CONFIG_REMOTE_ACCESS_KEY_ID
secret_access_keysecret_access_keyRCLONE_CONFIG_REMOTE_SECRET_ACCESS_KEY
accountaccountRCLONE_CONFIG_REMOTE_ACCOUNT
keykeyRCLONE_CONFIG_REMOTE_KEY
tokentokenRCLONE_CONFIG_REMOTE_TOKEN
endpointendpointRCLONE_CONFIG_REMOTE_ENDPOINT

Pass credentials as project/account secrets, never as literals.

⁠Invocation

The entrypoint runs, after exporting the config above:

rclone copy "$INPUT_SOURCE" "$INPUT_DEST" $INPUT_FLAGS
  • source and dest are remote:path (with a local /mnt/workspace/... path on one side to read from or write to the shared workspace).
  • flags is optional extra rclone flags (e.g. --dry-run --progress), passed through verbatim.

The image is Alpine-based and runs as the base image's non-root rclone user (UID 1009) with ca-certificates already installed.

⁠Tags

Each tag is the version of rclone the image packages, such as 1.74.4. A rebuild that keeps that version, to pick up a fixed base image or wrapper, adds -r1, -r2, and so on. A tag is never reused; latest follows the newest publish.

⁠Building

From the repository root:

docker build -t swaleio/rclone:dev images/rclone

Merging a change under images/rclone publishes the image under its next tag; task definitions reference it by digest.


Built from images/rclone⁠ in the swaleio/task-definitions⁠ repository. For how a task definition references an image, see the task definition reference⁠ in the Swale documentation⁠.

The Dockerfile and entrypoint are covered by the MIT License⁠. rclone is MIT-licensed.

This image also contains software from other projects, each under its own license: apk list -I inside the image names every Alpine package with its version and license, and rclone builds in sddl (github.com/cloudsoda/sddl), a Go module under LGPL-3.0. Source code for its GPL and LGPL components:

We also provide that source code on request: see Third-party software⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:4e7d800fb…
Size
33.1 MB
Last updated
9 days ago
docker pull swaleio/rclone:latest