6 Commits

Author SHA1 Message Date
Ivan Gabaldon
16293132e3
[mod] ci: use custom static podman (#5354)
We only need updated podman on `build`. `test` and `release` can use image
provided container engine binaries.
2025-10-22 14:38:59 +02:00
Ivan Gabaldon
5492de15bb
[mod] container: move base to own repository (#5310)
The base images will be now built in
[another repository](https://github.com/searxng/base).
2025-10-12 16:30:57 +02:00
Ivan Gabaldon
d2e2802514
[fix] utils: variable expansion (#5237)
Docker buildx outputs the following error:

  variable expansion is not supported for --from, define a new stage with FROM
  using ARG from global scope as a workaround.

Also force BuildKit extension to be installed, legacy build is no longer
supported.

Closes https://github.com/searxng/searxng/issues/5219
2025-09-23 20:34:28 +02:00
Ivan Gabaldon
b7ecc1c240
[enh] container: reproducible layers (#5222)
* [enh] container: reproducible layers

We are not aiming for reproducibility compliance, but we look to make most
builder layers reproducible without caching at least for a short period of time
(until the builder's base image changes or the child dependencies of a
requirements.txt package are updated).

This feature is only available on Podman.

This targets https://github.com/searxng/searxng/pull/5086 main goal.

* [fix] misc: apply suggestions

Suggested: https://github.com/searxng/searxng/pull/5222#discussion_r2364630496
Suggested: https://github.com/searxng/searxng/pull/5222#discussion_r2364630511

* [enh] container: prevent useless layer
2025-09-20 11:33:23 +02:00
Ivan Gabaldon
164167dea0
[mod] py: remove uvloop (#5220)
We get some good stuff without uvloop, 13MB~ less of dependencies, 3
minutes of build time for armv7 saved, and we are one step closer to NT
compatibility. Although it's true that theoretically the raw performance
have worsened on network side (we only used uvloop for that), the latest
cpython versions have been improving on asyncio performance.
2025-09-20 11:12:34 +02:00
Ivan Gabaldon
3de7a6da2d
[enh] container: tidy builds (#5086)
Building the container currently does not work properly.
When rebuilding several times with `make container`, `version_frozen.py`
is recreated, which wouldn't be an issue if the file’s timestamp was constant.
Now, when creating `version_frozen.py`, it will have the same timestamp as the
commit when it was created. (`version_frozen.py` is moved to a dedicated layer).

Reusing "builder" cache when building "dist" could be slow
(CD reports 2 seconds, but locally I've seen it take up to 10 seconds),
so the Dockerfile is now split and we save a couple steps
by importing the "builder" image directly.

The last changes made it possible to remove the layer cache in "builder",
since the overhead is now greater than building the layers from scratch.

Until now, all "dist" layers were squashed into a single layer,
which in most cases is a good idea
(except for storage/delivery pricing/overhead), but in our case,
since we manage the entire pipeline, we can ignore this
and share layers between builds.
This means (for example) that if we change files unrelated to the container
in several consecutive commits (documentation changes), we don't have to push
the entire image to registry, but only the different layers
(`version_frozen.py` in this example).
The same applies when pulling, as only the layers that have changed
compared to the local layers will be downloaded (that's the theory,
we'll see if this works as expected or if we need to tweak something else).
2025-08-07 10:46:26 +02:00