1. Images & Charts
  2. nginx-s3-gateway
nginx-s3-gateway

nginx-s3-gateway

Infra
Updated 10 hours ago

NGINX S3 Gateway Overview

Secure your stack with a hardened NGINX S3 Gateway image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies.


Use the NGINX S3 Gateway to proxy requests to an Amazon S3-compatible object storage. The gateway allows users to access files stored in S3 (or compatible storage like MinIO, Wasabi, etc.) through NGINX as an HTTP gateway.


Try It Out

To take the Minimus NGINX S3 Gateway image for a test run, we will use Docker Compose.

Save the following code to a new file compose.yaml in your project directory. Update the template to replace the placeholders with your valid AWS access key ID and secret:

services:
  nginx-s3-gateway:
    depends_on:
      minio:
        condition: service_healthy
    image: reg.mini.dev/nginx-s3-gateway
    container_name: nginx-s3-gateway
    ports:
      - "8989:8080/tcp"
    environment:
      - S3_BUCKET_NAME=test-bucket
      - AWS_ACCESS_KEY_ID={aws-access-key-id}
      - AWS_SECRET_ACCESS_KEY={aws-secret-access-key}
      - AWS_SIGS_VERSION=4
      - S3_SERVER=minio
      - S3_SERVER_PORT=9000
      - S3_SERVER_PROTO=http
      - S3_REGION=us-east-1
      - S3_SERVICE=s3
      - S3_STYLE=virtual-v2
      - ALLOW_DIRECTORY_LIST=true

  minio:
    image: quay.io/minio/minio:latest
    hostname: test-bucket.minio
    command: server /data
    ports:
      - "9090:9000/tcp"
    environment:
      - MINIO_ADDRESS=:9000
      - MINIO_ROOT_USER={aws-access-key-id}
      - MINIO_ROOT_PASSWORD={aws-secret-access-key}
      - MINIO_REGION_NAME=us-east-1
      - MINIO_DOMAIN=minio
      - MINIO_BROWSER=off
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 5s
      timeout: 3s
      retries: 3

Run the container:

docker compose up

Next, configure the AWS CLI for MinIO. Replace the placeholders with your valid AWS access key ID and secret:

export AWS_ACCESS_KEY_ID={aws-access-key-id}
export AWS_SECRET_ACCESS_KEY={aws-secret-access-key}

You are now ready to create the bucket for testing:

aws s3api create-bucket \
  --bucket test-bucket \
  --endpoint-url "http://localhost:9090" \
  --no-verify-ssl

Upload a file to MinIO so you can test it. In the below example, we assume the file name is test.txt:

echo "TEST" > test.txt
aws s3 cp test.txt s3://test-bucket/ --endpoint-url http://localhost:9090

Visit http://localhost:8989 in your browser to view the test.txt file. Alternatively, run curl http://localhost:8989/ to list the files through the NGINX S3 Gateway.


Technical Considerations

The NGINX S3 Gateway image provided by Minimus is a slim, security-hardened alternative to the public image. The images are largely interchangeable, with a few differences as noted below.

NGINX S3 Gateway built by Minimus:

  1. Runs as non-root by default for a security-first approach that protects against privilege escalation attacks.
  2. Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.