Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Dockerfile: Make wget available. #7995

Closed
wants to merge 1 commit into from

Conversation

schildbach
Copy link

@schildbach schildbach commented Jul 30, 2020

Wget is often used for Docker health checks. It was available up until the change from Alpine to Debian, so not having is available is a bit of a regression.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
  • Pull request includes a sign off
  • Code style is correct (run the linters)

Wget is often used for Docker health checks. It was available up until the change from Alpine to Debian, so not having is available is a bit of a regression.
@schildbach
Copy link
Author

Just for reference, the health check configuration that can be used in a docker-compose.yaml file is:

    healthcheck:
      test: ["CMD", "wget", "http://localhost:8008/_synapse/admin/v1/server_version", "--output-document=/dev/null"]

Docker runs this within the container, so wget (or curl, or busybox, or a custom client) needs to be available for it to work.

@richvdh
Copy link
Member

richvdh commented Jul 30, 2020

@schildbach out of interest, what purpose does this healthcheck serve that is not simply covered by ensuring that the container is running? I guess it would detect if synapse had somehow locked up, but is that a common problem? It feels to me like the healthcheck just adds another failure mode.

@schildbach
Copy link
Author

It makes sure Synapse has started up and is (still) responding to requests.

Ideally, the app itself would implement whatever it thinks is reasonable to check. For example, for Postgres there is the pg_isready command. Such a client is what I meant with "custom client".

@maquis196
Copy link
Contributor

Curl was added to docker in #8147, so this is probably superfluous now.

@richvdh richvdh closed this Aug 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants