push¶
Export a local Docker image and upload it to S3.
Arguments¶
| Argument | Description |
|---|---|
<local-image> |
Image name and tag as shown in docker images, e.g. myapp:v1.0 |
<s3-ref> |
Destination in s3://bucket/image:tag or local://path/image:tag format. Tag is required. |
Flags¶
| Flag | Description |
|---|---|
--force |
Overwrite an existing tag even if immutability is enabled |
What it does¶
- Exports the image from the local Docker daemon as a tar archive.
- Parses the OCI Image Layout from the archive.
- Checks which blobs already exist in
blobs/sha256/on S3. - Uploads missing blobs to
blobs/sha256/<digest>using S3 Intelligent-Tiering. - Uploads manifest files to
manifests/<image>/<tag>/.
Only missing blobs are uploaded — blobs shared with other images in the bucket are skipped automatically.
Examples¶
# Push a tagged image
s3lo push myapp:v1.0 s3://my-bucket/myapp:v1.0
# Push with a git commit SHA
s3lo push myapp:$(git rev-parse --short HEAD) s3://my-bucket/myapp:$(git rev-parse --short HEAD)
# Push to a nested image name
s3lo push backend:latest s3://my-bucket/org/backend:latest
# Force-overwrite an immutable tag
s3lo push myapp:v1.0 s3://my-bucket/myapp:v1.0 --force
# Push to local storage
s3lo push myapp:v1.0 local://./local-s3/myapp:v1.0
Output¶
The progress bar shows bytes uploaded and elapsed time. It's hidden automatically in non-TTY environments (CI).
Notes¶
Image must exist locally
The image must be available in your local Docker daemon (docker images). If not, run docker pull myapp:v1.0 first.
Apple Silicon and EKS
On Apple Silicon Macs, Docker images are linux/arm64 by default. For EKS nodes running linux/amd64, build or pull the correct platform explicitly:
docker build --platform linux/amd64 -t myapp:v1.0 .
# or
docker pull --platform linux/amd64 myapp:v1.0
s3lo copy to mirror multi-arch images directly to S3 without this concern.
Idempotent
Pushing the same image twice is safe and fast. The second push skips all blobs and only re-uploads the manifest (a few bytes).
Explicit tag required
The destination tag must be specified explicitly — s3lo push myapp:v1.0 s3://my-bucket/myapp (without :tag) is an error.