summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Ferrazzutti <andrewf@element.io>2025-04-01 11:51:00 -0400
committerGitHub <noreply@github.com>2025-04-01 15:51:00 +0000
commit5c84f258095535aaa2a4a04c850f439fd00735cc (patch)
tree98cc9bb384927b992e36bd4dfd3c6dc0433c06ac
parentMerge changelog entries (diff)
downloadsynapse-5c84f258095535aaa2a4a04c850f439fd00735cc.tar.xz
complement-synapse: COPY existing dir from base (#18294)
The base postgres image already has the /var/run/postgresql directory,
and COPY can set file ownership with chown=, so COPY it instead of
making it from scratch & manually setting its ownership.

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
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.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
-rw-r--r--changelog.d/18294.docker1
-rw-r--r--docker/complement/Dockerfile2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/18294.docker b/changelog.d/18294.docker
new file mode 100644

index 0000000000..cc40ca90c0 --- /dev/null +++ b/changelog.d/18294.docker
@@ -0,0 +1 @@ +Optimize the build of the complement-synapse image. diff --git a/docker/complement/Dockerfile b/docker/complement/Dockerfile
index 3e7f808cc5..dd029c5fbc 100644 --- a/docker/complement/Dockerfile +++ b/docker/complement/Dockerfile
@@ -25,7 +25,7 @@ FROM $FROM RUN adduser --system --uid 999 postgres --home /var/lib/postgresql COPY --from=postgres_base /usr/lib/postgresql /usr/lib/postgresql COPY --from=postgres_base /usr/share/postgresql /usr/share/postgresql -RUN mkdir /var/run/postgresql && chown postgres /var/run/postgresql +COPY --from=postgres_base --chown=postgres /var/run/postgresql /var/run/postgresql ENV PATH="${PATH}:/usr/lib/postgresql/13/bin" ENV PGDATA=/var/lib/postgresql/data