Last changed
Contact our team to test out this image for free. Please also indicate any other images you would like to evaluate.
Request trialThe 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.
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 Containers are minimal container images that are secure by default.
In many cases, the Chainguard Containers tagged as :latest
contain only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager. Chainguard Containers are built with Wolfi, our Linux undistro 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 -dev
variant.
Although the -dev
container image variants have similar security features as their more minimal versions, they feature additional software that is typically not necessary in production environments. We recommend using multi-stage builds to leverage the -dev
variants, copying application artifacts into a final minimal container that offers a reduced attack surface that won’t allow package installations or logins.
To better understand how to work with Chainguard Containers, please visit Chainguard Academy and Chainguard Courses.
In addition to Containers, Chainguard offers VMs and Libraries. Contact Chainguard to access additional products.
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