Sign inSign up

camconn/garbagebin

By camconn

•Updated 15 days ago

Garbage Bin throwaway server for Object Storage test mocking

Image
0

462

camconn/garbagebin repository overview

⁠Garbage Bin

A single-process, S3-compatible object store that runs as one Docker container for local development and testing.

Source, docs and issues: https://github.com/camconn/garbagebin⁠

⁠Tags

Use camconn/garbagebin:latest unless you need a pinned version.

  • latest: newest release
  • X.Y.Z, X.Y: releases
  • edge: tracks master
  • sha-<commit>: a single build

Every tag covers linux/amd64 and linux/arm64.

⁠Quick start

docker run --rm -p 9000:9000 camconn/garbagebin:latest

export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-1
aws --endpoint-url http://localhost:9000 s3 mb s3://my-bucket
aws --endpoint-url http://localhost:9000 s3 cp README.md s3://my-bucket/

Use path-style addressing, or set S3_VHOST_DOMAIN for virtual-host style. GET /health returns 200 once the server is ready; the image's HEALTHCHECK polls it.

⁠docker-compose

services:
  s3:
    image: camconn/garbagebin:latest
    ports: ["9000:9000"]
    environment:
      S3_INIT_BUCKETS: uploads,exports
      # S3_BACKEND: fs          # keep data across restarts; mount a volume at /data
    # volumes: ["./s3-data:/data"]
  app:
    build: .
    depends_on:
      s3:
        condition: service_healthy
    environment:
      AWS_ENDPOINT_URL_S3: http://s3:9000
      AWS_ACCESS_KEY_ID: test
      AWS_SECRET_ACCESS_KEY: test
      AWS_REGION: us-east-1

⁠Configuration

Env varDefaultNotes
S3_LISTEN0.0.0.0:9000HTTP only
S3_BACKENDmemorymemory or fs
S3_DATA_DIR/datafs backend only; a VOLUME
S3_ACCESS_KEY, S3_SECRET_KEYtest / testChecked only with strict auth
S3_STRICT_AUTHfalseReject requests whose SigV4 signature doesn't verify
S3_REGIONus-east-1
S3_INIT_BUCKETS(none)Comma-separated, created at startup
S3_VHOST_DOMAIN(none)e.g. localhost makes mybucket.localhost address mybucket
S3_LOGinfoJSON to stdout
S3_NOW(system time)RFC 3339 instant that fixes the clock for Object Lock, to permit manual clocks

Full details in the design doc⁠.

⁠Testcontainers

Modules for Go, Python, Java and JS default to camconn/garbagebin:latest; see testcontainers/⁠.

⁠License

AGPL-3.0-or-later

Tag summary

Content type

Image

Digest

sha256:898ba9a1e…

Size

4.5 MB

Last updated

15 days ago

docker pull camconn/garbagebin