Skip to content

Instantly share code, notes, and snippets.

@nitisht
Last active December 3, 2023 18:29
Show Gist options
  • Save nitisht/ae31e00695788f55f498c5534b35c29f to your computer and use it in GitHub Desktop.
Save nitisht/ae31e00695788f55f498c5534b35c29f to your computer and use it in GitHub Desktop.
Run Minio GCS Gateway on Docker

Run Minio Gateway Binary

 gcloud init
  • If you are reauthenticating use this command instead
gcloud beta auth application-default login
  • Perform the authentication using your minio.io email address (the CLI will launch a broswer window or show you a link)

  • Go to cloud.google.com (login using the minio.io address)

  • Select Organization : Minio (located on the top bar)

  • You should see the following screenshots :

  • Click on settings to see projectid (projectid is how you access the buckets/objects programatically). There is no accesskey secret key as we see in s3 compatible object stores.

  • GCS seems to have an interoperability mode. We have not turned this on for now. We do have to test this also later perhaps. Aparently there is some s3 compatibililty with gcs when this mode is turned on but not sure yet to what extent its available.

  • An eg of how to start minio in gateway mode

MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 minio gateway gcs projectgcstest1

Run GCS Gateway on Docker

Due to requirements like gcloud auth, there are changes needed to deploy Minio gateway on Docker.

  • Authenticate your Google minio.io account using
gcloud auth application-default login
  • Locate the application_default_credentials.json file location printed in the console in above command.
  • Update [gcloud-credential-files] field below with the actual file path, then run the below command
docker run -p 9000:9000 --name minio1 \
    -e "MINIO_ACCESS_KEY=minio" \
    -e "MINIO_SECRET_KEY=minio123" \
    -v [gcloud-credential-files]:/gcloud_credentials.json \
    -e "GOOGLE_APPLICATION_CREDENTIALS=/gcloud_credentials.json" \
    nitisht/miniogateway:feature-gcs gateway gcs projectgcstest1

You may notice the non official Minio Docker image used here - nitisht/miniogateway, this is because GCS gateway is still in a separate branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment