Commit graph

32 commits

Author SHA1 Message Date
Christopher May-Townsend d5305000f1
Docker healthcheck timings - add startup delay and changed interval (#9913)
* Add healthcheck startup delay by 5secs and reduced interval check to 15s
to reduce waiting time for docker aware edge routers bringing an
instance online
2021-05-05 17:33:04 +02:00
Johannes Wienke cb657eb2f8
Put opencontainers labels to the final image (#9765)
They don't make any sense on the intermediate builder image. The final
images needs them to be of use for anyone.

Signed-off-by: Johannes Wienke <languitar@semipol.de>
2021-04-08 13:49:14 +01:00
Eric Eastwood 0a778c135f
Make pip install faster in Docker build for Complement testing (#9610)
Make pip install faster in Docker build for [Complement](https://github.com/matrix-org/complement) testing.

If files have changed in a `COPY` command, Docker will invalidate all of the layers below. So I changed the order of operations to install all dependencies before we `COPY synapse /synapse/synapse/`. This allows Docker to use our cached layer of dependencies even when we change the source of Synapse and speed up builds dramatically! `53.5s` -> `3.7s` builds 🤘

As an alternative, I did try using BuildKit caches but this still took 30 seconds overall on that step. 15 seconds to gather the dependencies from the cache and another 15 seconds to `Installing collected packages`.

Fix https://github.com/matrix-org/synapse/issues/9364
2021-03-26 18:42:58 +00:00
Erik Johnston 019010964d Merge branch 'master' into develop 2021-03-26 12:26:58 +00:00
Erik Johnston 12d6184713
Explicitly upgrade openssl in docker file and enforce new version of cryptography (#9697) 2021-03-26 12:00:25 +00:00
Johannes Wienke 4612302399
Include opencontainers labels in Docker image (#9612)
Cf. https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys

Signed-off-by: Johannes Wienke <languitar@semipol.de>
2021-03-22 15:31:00 +00:00
Mathieu Velten ccf1dc51d7
Install jemalloc in docker image (#8553)
Co-authored-by: Will Hunt <willh@matrix.org>
Co-authored-by: Erik Johnston <erik@matrix.org>
2021-03-16 11:32:18 +00:00
Dan Callahan b8b172466f
Add rustc to Docker image build environment (#9405)
This is needed to build the cryptography library, since it does not
provide wheels for ARMv7.

Fixes #9403

Signed-off-by: Dan Callahan <danc@element.io>
2021-02-15 15:30:16 +00:00
Jordan Bancino 295c209cdd
Remove version pin prometheus_client dependency (#8875)
This removes the version pin of the `prometheus_client` dependency, in direct response to #8831. If merged, this will close #8831 

As far as I can tell, no other changes are needed, but as I'm no synapse expert, I'm relying heavily on CI and maintainer reviews for this. My very primitive test of synapse with prometheus_client v0.9.0 on my home server didn't bring up any issues, so we'll see what happens.

Signed-off-by: Jordan Bancino
2020-12-04 13:01:06 +00:00
Andrew Morgan c087f68053
Cap the version of prometheus_client to <v0.9.0 in the dockerfile (#8767)
Short-term fix for https://github.com/matrix-org/synapse/issues/8766.
2020-11-17 16:01:33 +00:00
Dan Callahan ca39e67f3d
Use Python 3.8 in Docker images by default (#8698)
This bumps us closer to current Python without going all the way to 3.9.

Fixes #8674

Signed-off-by: Dan Callahan <danc@element.io>
2020-11-02 16:33:06 +00:00
Christopher May-Townsend ed18f32e1b
Add required Debian dependencies to allow docker builds on the arm platform (#8144)
Signed-off-by: Christopher May-Townsend <chris@maytownsend.co.uk>
2020-08-26 15:03:20 +01:00
Christopher May-Townsend 64e8a4697a
Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) 2020-08-24 18:15:18 +01:00
Christopher May-Townsend a5545cf86d
Switch to Debian:Slim from Alpine for the docker image (#7839)
As mentioned in #7397, switching to a debian base should help with multi-arch work to save time on compiling. This is unashamedly based on #6373, but without the extra functionality. Switch python version back to generic 3.7 to always pull the latest. Essentially, keeping this as small as possible. The image is bigger though unfortunately.
2020-07-17 17:40:53 +01:00
Juho Vanhanen d378c3da78
Add libwebp dependency to Dockerfile (#7791)
* Add libwebp dependency to Dockerfile

Signed-off-by: Juho Vanhanen <juho@vanhanen.io>
2020-07-06 13:37:39 +01:00
Cédric Laubacher a251e0f4ba
Update runtime docker image to Alpine v3.11 2020-05-03 16:07:24 +02:00
Richard van der Hoff 3dd2b5f5e3
bump the version of Alpine Linux used in the docker images (#6897) 2020-02-12 12:02:53 +00:00
Slavi Pantaleev f369164761 Upgrade Alpine Linux used in the Docker image (3.8 -> 3.10) (#5619)
Alpine Linux 3.8 is still supported, but it seems like
it's quite outdated now.

While Python should be the same on both, all other libraries, etc.,
are much newer in Alpine 3.9 and 3.10.

Signed-off-by: Slavi Pantaleev <slavi@devture.com>
2019-07-12 11:38:25 +01:00
Amir Zarrinkafsh de8077a164 Add ability to set timezone for Docker container (#5383)
Signed-off-by: Amir Zarrinkafsh <nightah@me.com>
2019-07-02 10:31:06 +01:00
Richard van der Hoff f817fc9ad5 Update docker image to use Python 3.7. (#5546)
Python 3.7 is apparently faster than 3.6, and should be mature enough.
2019-06-25 14:20:53 +10:00
Richard van der Hoff 8e7ef3a023 Include xmlsec in the docker image
Fixes #5467.
2019-06-18 22:35:19 +01:00
Richard van der Hoff 40b35fb875
Enable ACME support in the docker image (#4566)
Also:

* Fix wrapping in docker readme
* Clean up some docs on the docker image
* a workaround for #4554
2019-02-05 13:42:21 +00:00
Richard van der Hoff 3ef71a6ea0
Docker: only copy what we need to the build image (#4562)
There are two reasons this is a good thing:

 * first, it means that you don't end up with stuff kicking around your working
   copy ending up in the build image by mistake (which can upset the pip
   install process)

 * second: it means that the docker image cache is more effective, and we can
   reuse docker images when iterating on the docker stuff.
2019-02-05 11:44:40 +00:00
Richard van der Hoff 95fca1c7e9 fix docker build to install optional deps 2019-01-09 16:37:51 +00:00
Richard van der Hoff 53c5fa4e6c
Further reduce the size of the docker image (#3972)
Rewrite the dockerfile as a multistage build: this means we can get rid of a whole load of cruft which we don't need.
2018-10-01 12:29:17 +01:00
Jan Christian Grünhage df55a943ca
Update Dockerfile 2018-09-25 14:33:38 +02:00
Jan Christian Grünhage 8dfb33d325 make python 3 work in the docker container 2018-09-20 14:55:11 +02:00
Jan Christian Grünhage af10fa6536 add runtime dependencies 2018-09-10 17:39:49 +02:00
Mathijs van Gorcum e586916cda
Move COPY before RUN and merge RUNs 2018-09-10 14:02:42 +00:00
Mathijs van Gorcum b7e7712f07
Remove build requirements after building 2018-09-10 12:21:42 +00:00
Jan Christian Grünhage d967653705 update docker base-image to alpine 3.8 2018-08-09 13:31:10 +02:00
Michael Kaye 0d25724419 Refactor docker locations and README.
This addresses #3224
2018-08-02 18:21:32 +01:00
Renamed from Dockerfile (Browse further)