GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

Define a Docker health check

オープン
#2,046 コメント 6 件 リアクション 9 件 担当者 1 名 @hessjcg に割り当て済み GitHub で見る
priority: p2 type: feature request
主要言語
Go
スター
1.4k
フォーク
352
平均マージ
14時間 54分
マージ済み PR(30日)
5

説明

### Feature Description

I'd like to use Docker Compose's [health checks](https://docs.docker.com/compose/compose-file/05-services/#healthcheck) to bring up the proxy before starting dependent services, but I can't seem to be able to ping the readiness endpoints from within the container image.

It would be awesome if there was a health check defined in the cloud-sql-proxy image itself (see https://docs.docker.com/engine/reference/builder/#healthcheck).

### Sample code

_No response_

### Alternatives Considered

I tried pinging the existing readiness endpoint:
```
services:
...
cloud_sql_proxy:
...
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9999/readiness']
interval: 3s
timeout: 3s
retries: 5
```

However, it seems that `curl` is not available in the Docker image, and neither is any other utility that would allow one to hit the readiness endpoint.

### Additional Details

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。