A PostgreSQL image containing the gsutil application that lets you access Google Storage via CLI
1.1K
A PostgreSQL image containing the gsutil application that lets you access Google Storage from the command line.
Create a GCP service account and create a key for that service account. Next, assign the service account the role Storage Admin w.r.t. the Google Cloud Storage bucket.
NOTE: Make sure that, on Unix systems, the permissions on the before mentioned credential file are set to
0400. For example, to achieve this run:chmod 0400 gcp-credentials.json
When running a container of this image you MUST mount the before mentioned credential file under /run/secrets/ inside the container.
That is, the following file MUST be available inside the container:
/run/secrets/gcp-credentials.jsonThis can either be achieved using Docker Volumes or Docker Secrets.
Also, when running a container of this image you MUST specify the environment variable GCP_PROJECT.
All available environment variables are:
| Environment Variable | Default Value | Required | Description |
|---|---|---|---|
| GCP_PROJECT | ✔ | The Google Cloud Project ID of the project the Google Cloud Storage Bucket is part of |
This image can be used as follows:
docker run --tty \
--interactive \
--rm \
--env GCP_PROJECT=<REPLACE_WITH_PROJECT_NAME> \
--volume `pwd`/gcp-credentials.json:/run/secrets/gcp-credentials.json \
xsystems/postgres-gsutil ls -al gs://<REPLACE_WITH_BUCKET_NAME>
Run build.sh to build an image of the current codebase state with tag latest.
VERSION environment variable to the version that needs to be released.COMMIT environment variable to the hash of the Git commit that needs to be released. It defaults to the latest commit.Example release statement:
VERSION=1.3.42 ./release.sh
Content type
Image
Digest
Size
172 MB
Last updated
about 6 years ago
docker pull xsystems/postgres-gsutil