sourcegraph/docker-images
Robert Lin d2d4491a40
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329)
Upgrades to our forked update v0.27.0, which matches the Alertmanager
version we deploy:
3695ef8bcc.
Upon closer inspection I also realized I upgraded `prometheus/common`
too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've
downgraded it to match the revision of Alertmanager we are using, while
_also_ fulfilling the OpenFGA dependency
https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946
for https://github.com/sourcegraph/sourcegraph/pull/63173 💀

The latest version of `prometheus/common` marshals configuration values
that are unknown to our version of Alertmanager (v0.27.0) which rejects
the generated configuration from `prom-wrapper`.

I've also made a few updates to improve the testing and improve the
prometheus and alertmanager output by forwarding them to
differently-scoped loggers and crude conversion of the log levels:


![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb)

Related: https://github.com/sourcegraph/sourcegraph/pull/63171
Closes CORE-186

## Test plan

`sg start` and `sg run prometheus`, update some alerting configs in
http://localhost:9090/alertmanager/#/status:


<img
src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301"
width="30%">

In personal settings:

```json
{
  "alerts.hideObservabilitySiteAlerts": false
}
```

No banners show up indicating Prometheus is unhealthy.
2024-06-19 13:46:30 -07:00
..
alpine-3.14 bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569) 2024-02-20 13:57:56 +00:00
blobstore bazel: Add container test for s3proxy (#62893) 2024-05-24 14:02:37 +01:00
caddy chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
cadvisor chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
codeinsights-db bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
codeintel-db bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
dind Reapply "bazel: migrate dind dockerfile to rules_oci" (#61790) (#61824) 2024-04-12 15:52:44 +00:00
executor-vm Publish sourcegraph-base image (#62002) 2024-04-19 14:44:06 +01:00
grafana chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
indexed-searcher chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
initcontainer chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
jaeger-agent chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
jaeger-all-in-one chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
node-exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
opentelemetry-collector fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
postgres_exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
postgres-12-alpine chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
prometheus chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) 2024-06-19 13:46:30 -07:00
redis_exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
redis-cache chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
redis-store chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
search-indexer chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
sg bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
syntax-highlighter syntax-highlighter: Use camino to make handling utf8 paths nicer (#63311) 2024-06-18 19:50:53 +02:00
README.md enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00

Sourcegraph derivative Docker images

This directory contains Sourcegraph docker images which are derivatives of an existing Docker image, but with better defaults for our use cases. For example:

  • sourcegraph/alpine handles setting up a sourcegraph user account, installing common packages.
  • sourcegraph/postgres-11.4 is postgres-11.4 but with some Sourcegraph defaults.

If you are looking for our non-derivative Docker images, see e.g. /cmd/.../Dockerfile instead.

Building

All images in this directory are built and published automatically on CI:

Adding a new image

  1. Create a build.sh and add your publishing script to it - the script should end with docker tag ... "$IMAGE". See the scripts in this directory for examples.
  2. Ensure your new script is executable with chmod +x build.sh (you can try it via e.g. IMAGE=fake-repo/cadvisor:latest docker-images/$SERVICE/build.sh, or by building a test image)
  3. Add an image to the automated builds pipeline by adding it to SourcegraphDockerImages.