8000 GitHub - jakobmoellerdev/s3-oci: lightweight server that mimics the Amazon S3 API while using OCI images as the storage backend
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jakobmoellerdev/s3-oci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪣 s3-oci – S3-Compatible Server Backed by OCI Registries

s3-oci is a lightweight server that mimics the Amazon S3 API while using OCI images as the storage backend. This allows S3-compatible tools (like the AWS CLI) to read from and write to container registries as if they were object storage buckets.


🚀 Getting Started

1. Run the Server

Make sure you have Go installed, have a valid registry ready (e.g. ghcr.io with a token with write:packages scope together with your github user), then start the server:

export YOUR_GITHUB_USER=jakobmoellerdev
go run ./... \
  --credentials.username ${YOUR_GITHUB_USER} \
  --credentials.password $(gh auth token) \
  --prefix ${YOUR_GITHUB_USER}/oci/s3/ \
  --registry ghcr.io
  • --credentials.*: Registry credentials for authentication.
  • --prefix: Path prefix used in the target OCI registry (e.g. ghcr.io/jakobmoellerdev/oci/s3/).

2. Configure the AWS CLI

Use a custom profile to interact with your server:

Set the following values:

aws configure set region us-east-1 --profile s3-oci
aws configure set aws_access_key_id MY_ACCESS --profile s3-oci
aws configure set aws_secret_access_key MY_SECRET --profile s3-oci
aws configure set endpoint_url http://localhost:9000 --profile s3-oci

Note: Replace MY_ACCESS and MY_SECRET with the credentials you used to start the server. The values here are placeholder and need to be aligned with config.yaml contents.


3. Example: Upload and Download

You can now use standard S3 commands to interact with the server:

# Set the AWS profile to use, we just configured this!
export AWS_PROFILE=s3-oci

# Create a bucket
aws s3api create-bucket --bucket mybucket

# Upload a file
echo "foobar" | aws s3 cp - s3://mybucket/hello.txt

# Download and print the file
aws s3 cp s3://mybucket/hello.txt -
# Output: foobar

🧱 Use Cases

  • Store versioned artifacts in OCI registries using familiar S3 tooling.
  • Integrate with CI/CD pipelines using aws s3 commands.
  • Bridge tools that require S3 but need to work with OCI-native formats.

📦 Status

This project is experimental. Expect API changes and contribute with feedback!


About

lightweight server that mimics the Amazon S3 API while using OCI images as the storage backend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0