Last changed
Contact our team to test out this image for free. Please also indicate any other images you would like to evaluate.
The Cloud SQL Auth Proxy is a utility for ensuring secure connections to Cloud SQL instances.
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev
:
Be sure to replace the ORGANIZATION
placeholder with the name used for your organization's private repository within the Chainguard Registry.
The cgr.dev/chainguard/cloud-sql-proxy
image is a minimal build of Google Cloud SQL Auth Proxy. Switching to this image should not require any changes to your existing setup.
Chainguard currently does not offer a v1 image for cgr.dev/chainguard/cloud-sql-proxy
, since v1 is no longer in active feature development, and any new releases are limited to maintenance. For this reason, Google's own artifact registry no longer hosts v1 images.
To run this cloud-sql-proxy
image, you will need the following:
Cloud SQL Client
IAM role is required to authenticate with your Cloud SQL instance. Refer to the official documentation on creating a service account for instructions on how to set this up and download the JSON key.This cloud-sql-proxy
image's ENTRYPOINT
is configured to run the proxy directly. The following command shows a basic setup of running the proxy as a standalone Docker container, using a service account key for authentication:
In the command above:
<host-port>
: The port on your host machine that your application will use to connect to the database (e.g., 3306
for MySQL, 5432
for PostgreSQL).<proxy-port>
: The port the proxy listens on inside the container.$(pwd)/sa.json
: The absolute path to your downloaded service account key file on your host machine.<instance-connection-name>
: The connection string for your Cloud SQL instance, formatted as project_id:region:instance_name
.After executing this command, your applications on the host machine can connect to localhost:<host-port>
to establish a secure connection to your Cloud SQL instance through the proxy. For example, if your instance is for a postgresql
database, you can connect using:
The cloud-sql-proxy
image supports various configurations via command-line flags.
For instance, to configure the proxy to use Private IP to connect to your Cloud SQL instance, include the --private-ip flag in your command:
The proxy also provides configurations for using automatic IAM database authentication, Unix domain sockets for local connections, or enabling service account impersonation for flexible access control. Refer to the Cloud SQL Auth Proxy docs for instructions and examples on available configurations.
Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.
All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev
, variant.
In all other cases, including Chainguard Containers tagged as :latest
or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.
Although the -dev
container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev
variant into a more minimal production image.
To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl
, or API.
To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:
Apache-2.0
LGPL-2.1-or-later
MIT
MPL-2.0
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreement