From c89ecfdda2122ff23ce0a737bab6b4ef6a5fc978 Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Mon, 9 Feb 2026 12:03:48 +0100 Subject: [PATCH 01/10] Add custom Docker build for package registry --- Dockerfile.custom-registry | 71 ++++++++++++++++++++++++++++ README.md | 34 +++++++++++++ cmd/distribution/custom-packages.yml | 40 ++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 Dockerfile.custom-registry create mode 100644 cmd/distribution/custom-packages.yml diff --git a/Dockerfile.custom-registry b/Dockerfile.custom-registry new file mode 100644 index 000000000..ac1649795 --- /dev/null +++ b/Dockerfile.custom-registry @@ -0,0 +1,71 @@ +# This image contains the package-registry binary AND a pre-warmed set of packages. + +ARG GO_VERSION=1.24 +ARG BUILDER_IMAGE=golang +ARG RUNNER_IMAGE=cgr.dev/chainguard/wolfi-base + +# STAGE 1: Build the 'distribution' tool +FROM --platform=${BUILDPLATFORM:-linux} ${BUILDER_IMAGE}:${GO_VERSION} AS distribution-builder +WORKDIR /src +COPY . . +ARG TARGETPLATFORM +# Build the distribution binary inside its own directory +RUN make -C cmd/distribution release-${TARGETPLATFORM:-linux/amd64} + + +# STAGE 2: Run the 'distribution' tool to download packages +FROM distribution-builder AS packager +# Copy the custom configuration for the packages we want +COPY ./cmd/distribution/custom-packages.yml . +# Run the tool. It will create the packages in 'build/distribution/' +RUN ./cmd/distribution/distribution ./cmd/distribution/custom-packages.yml + + +# STAGE 3: Build the final 'package-registry' binary +FROM --platform=${BUILDPLATFORM:-linux} ${BUILDER_IMAGE}:${GO_VERSION} AS registry-builder +WORKDIR /src +COPY . . +ARG TARGETPLATFORM +# Build the main package-registry binary from the root directory +RUN make release-${TARGETPLATFORM:-linux/amd64} + + +# STAGE 4: Final image assembly +FROM ${RUNNER_IMAGE} + +# Get dependencies (same as original Dockerfile) +# Mailcap is installed to get mime types information. +RUN if grep -q "Red Hat" /etc/os-release ; then \ + microdnf install -y mailcap zip rsync && \ + microdnf clean all ; \ + else \ + apk update && \ + apk add mailcap zip rsync curl && \ + rm -rf /var/cache/apk/* ; \ + fi + +WORKDIR /package-registry + +# Copy the main binary from the 'registry-builder' stage +COPY --from=registry-builder /src/package-registry . + +# --- THIS IS THE KEY STEP --- +# Copy the downloaded packages from the 'packager' stage into the final image +# The registry is configured to look for packages in '/packages/package-registry/' +COPY --from=packager /src/build/distribution/. /packages/package-registry/ + +# Get in config which expects packages in /packages +COPY config.docker.yml ./config.yml + +# Run as non-root user +USER 1000 + +# Start registry when container is run an expose it on port 8080 +EXPOSE 8080 +ENTRYPOINT ["./package-registry"] + +# Make sure it's accessible from outside the container +ENV EPR_ADDRESS=0.0.0.0:8080 + +HEALTHCHECK --interval=1s --retries=30 CMD curl --silent --fail localhost:8080/health || exit 1 + diff --git a/README.md b/README.md index e5a890593..3170649c0 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,39 @@ If you want to run the most recent registry for development, run the main tag. These images contain only the package registry, they don't contain any package. +#### Build a Custom Docker Package Registry Image + +The official Docker container for the Elastic Package Registry includes all available packages. For development or specific deployments, you might want to build a custom, smaller container that only includes packages compatible with your target Kibana environment. This results in a much smaller image footprint. + +To build your own custom Elastic Package Registry container image, follow these steps: + +1. **Define Your Package Set**: Create or modify the `cmd/distribution/custom-packages.yml` file to specify the desired package versions. You can filter by `kibana.version`, `spec.max`, and other criteria. + +2. **Build the Image**: Run the following command from the root of the repository to build your custom image. + + > **Note**: If you use a different configuration file than the default, remember to update the `Dockerfile.custom-registry` accordingly. + + ```bash + docker build -f Dockerfile.custom-registry -t custom-package-registry . + ``` + +**Example: Smaller Image Footprint** + +Here is an example of a custom image built with packages compatible with Kibana `>8.18`. The resulting image is significantly smaller than the official one. + +```bash + docker images + +IMAGE ID DISK USAGE CONTENT SIZE EXTRA +custom-package-registry:latest 193b9b282bf2 1.61GB 631MB +``` + +You can run your custom registry with the following command: + +```bash +docker run --rm -it -p 8080:8080 custom-package-registry +``` + ### Testing with Kibana The Docker image of Package Registry is just an empty distribution without any packages. @@ -243,6 +276,7 @@ information collected for requests in the [APM Guide](https://www.elastic.co/gui You can configure the agent to send the data to any APM Server using the following environment variables: +* `ELASTIC_APM_ACTIVE`: Boolean to activate the APM. * `ELASTIC_APM_SERVER_URL`: Address of the APM Server. Instrumentation is disabled in Package Registry if this variable is not set. * `ELASTIC_APM_API_KEY`: API key to use to authenticate with the APM Server, if needed. diff --git a/cmd/distribution/custom-packages.yml b/cmd/distribution/custom-packages.yml new file mode 100644 index 000000000..7cc790367 --- /dev/null +++ b/cmd/distribution/custom-packages.yml @@ -0,0 +1,40 @@ +# Base address of the Package Registry +address: "https://epr.elastic.co" + +# Queries are executed with each one of the parameters of the matrix. +matrix: + - spec.max: 3.0 + - prerelease: true + spec.max: 3.0 + +# Queries to execute to discover packages >8.18.0. +queries: + - kibana.version: 8.18.0 + spec.max: 3.3 + - kibana.version: 8.18.1 + spec.max: 3.3 + - kibana.version: 8.18.2 + spec.max: 3.3 + - kibana.version: 8.19.0 + spec.max: 3.4 + - kibana.version: 9.0.0 + spec.min: 2.3 + spec.max: 3.3 + - kibana.version: 9.0.1 + spec.min: 2.3 + spec.max: 3.3 + - kibana.version: 9.0.2 + spec.min: 2.3 + spec.max: 3.3 + - kibana.version: 9.1.0 + spec.min: 2.3 + spec.max: 3.4 + - kibana.version: 9.1.0 + spec.min: 2.3 + spec.max: 3.5 + + +actions: + - print: + - download: + destination: ./build/distribution From 1d71b8f713a99b5e1f3c90ba6db0c64f17a6efff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 21:54:00 +0100 Subject: [PATCH 02/10] Bump github.com/cloudflare/circl in /cmd/distribution (#1566) Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/cloudflare/circl/releases) - [Commits](https://github.com/cloudflare/circl/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/cloudflare/circl dependency-version: 1.6.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/distribution/go.mod | 2 +- cmd/distribution/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/distribution/go.mod b/cmd/distribution/go.mod index 868f54213..1e615cd02 100644 --- a/cmd/distribution/go.mod +++ b/cmd/distribution/go.mod @@ -12,7 +12,7 @@ require ( ) require ( - github.com/cloudflare/circl v1.6.0 // indirect + github.com/cloudflare/circl v1.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect golang.org/x/crypto v0.48.0 // indirect diff --git a/cmd/distribution/go.sum b/cmd/distribution/go.sum index 15bfe3c9a..e9b976466 100644 --- a/cmd/distribution/go.sum +++ b/cmd/distribution/go.sum @@ -2,8 +2,8 @@ github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1 github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= -github.com/cloudflare/circl v1.6.0 h1:cr5JKic4HI+LkINy2lg3W2jF8sHCVTBncJr5gIIq7qk= -github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= From 419be27daf0d5d0cc5433625f4971064388fb797 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 21:54:25 +0100 Subject: [PATCH 03/10] Bump github.com/google/go-querystring in /cmd/distribution (#1565) Bumps [github.com/google/go-querystring](https://github.com/google/go-querystring) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/google/go-querystring/releases) - [Commits](https://github.com/google/go-querystring/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: github.com/google/go-querystring dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/distribution/go.mod | 2 +- cmd/distribution/go.sum | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/distribution/go.mod b/cmd/distribution/go.mod index 1e615cd02..5f7bf6316 100644 --- a/cmd/distribution/go.mod +++ b/cmd/distribution/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.4.0 github.com/ProtonMail/go-crypto v1.3.0 github.com/elastic/package-registry v0.0.0 - github.com/google/go-querystring v1.1.0 + github.com/google/go-querystring v1.2.0 github.com/stretchr/testify v1.11.1 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/cmd/distribution/go.sum b/cmd/distribution/go.sum index e9b976466..e425ce4ad 100644 --- a/cmd/distribution/go.sum +++ b/cmd/distribution/go.sum @@ -6,10 +6,10 @@ github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= +github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= @@ -18,7 +18,6 @@ golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From c1cc954c3a4ef07c01b324b3c3158d84d3766e7b Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 12 Feb 2026 00:17:31 -0800 Subject: [PATCH 04/10] Update Go runtime to 1.25.7 (#1560) * Update Go runtime to 1.25.7 Co-Authored-By: Claude Opus 4.6 * Add PR link to changelog entry for Go 1.25.7 Co-Authored-By: Claude Opus 4.6 * Update CHANGELOG.md Co-authored-by: Mario Rodriguez Molins --------- Co-authored-by: Claude Opus 4.6 Co-authored-by: Mario Rodriguez Molins --- .go-version | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.go-version b/.go-version index 198ec23cc..f1968aa88 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.25.6 +1.25.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 45080ec75..b9f07e4eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bugfixes -* Update Go runtime to 1.25.6. [#1545](https://github.com/elastic/package-registry/pull/1545) +* Update Go runtime to 1.25.7. [#1545](https://github.com/elastic/package-registry/pull/1545) [#1560](https://github.com/elastic/package-registry/pull/1560) ### Added From 6f82dffe956d4c5d657e5990136374133bef2433 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Thu, 12 Feb 2026 13:12:47 +0100 Subject: [PATCH 05/10] Revert use of waitgroup.Go (#1567) It is not available in Go 1.24, the version used in go.mod files. --- workers/taskpool.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workers/taskpool.go b/workers/taskpool.go index e6f8854de..20c9a7042 100644 --- a/workers/taskpool.go +++ b/workers/taskpool.go @@ -27,12 +27,14 @@ func NewTaskPool(size int) *taskPool { // Do runs the task in a goroutine, ensuring no more tasks are running than the size of the pool. func (p *taskPool) Do(task func() error) { p.pool <- struct{}{} - p.wg.Go(func() { + p.wg.Add(1) + go func() { + defer p.wg.Done() defer func() { <-p.pool }() err := task() p.recordError(err) - }) + }() } func (p *taskPool) recordError(err error) { From 5571c49a3aa08a5016872774a59ea3d039f7a268 Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Thu, 12 Feb 2026 23:41:43 +0100 Subject: [PATCH 06/10] feat: Add custom Docker registry build and move package example --- README.md | 14 +++---- cmd/distribution/custom-packages.yml | 40 ------------------- cmd/distribution/examples/custom-packages.yml | 22 ++++++++++ 3 files changed, 29 insertions(+), 47 deletions(-) delete mode 100644 cmd/distribution/custom-packages.yml create mode 100644 cmd/distribution/examples/custom-packages.yml diff --git a/README.md b/README.md index 3170649c0..c44f801bf 100644 --- a/README.md +++ b/README.md @@ -167,23 +167,23 @@ These images contain only the package registry, they don't contain any package. #### Build a Custom Docker Package Registry Image -The official Docker container for the Elastic Package Registry includes all available packages. For development or specific deployments, you might want to build a custom, smaller container that only includes packages compatible with your target Kibana environment. This results in a much smaller image footprint. +The official Docker container for the Elastic Package Registry includes all available packages for every Kibana version. For development or specific deployments, you might want to build a custom, smaller container that only includes packages compatible with your target Kibana environment. This results in a much smaller image footprint. To build your own custom Elastic Package Registry container image, follow these steps: -1. **Define Your Package Set**: Create or modify the `cmd/distribution/custom-packages.yml` file to specify the desired package versions. You can filter by `kibana.version`, `spec.max`, and other criteria. +1. **Define Your Package Set**: Create or modify the `cmd/distribution/examples/custom-packages.yml` file to specify the desired package versions. You can filter by `kibana.version`, `spec.max`, and other criteria. 2. **Build the Image**: Run the following command from the root of the repository to build your custom image. - > **Note**: If you use a different configuration file than the default, remember to update the `Dockerfile.custom-registry` accordingly. +> **Note**: If you use a different configuration file than the default, remember to update the `Dockerfile.custom-registry` accordingly. - ```bash - docker build -f Dockerfile.custom-registry -t custom-package-registry . - ``` +```bash +docker build -f Dockerfile.custom-registry -t custom-package-registry . +``` **Example: Smaller Image Footprint** -Here is an example of a custom image built with packages compatible with Kibana `>8.18`. The resulting image is significantly smaller than the official one. +Here is an example of a custom image built with packages compatible with Kibana `>8.18.0` & `>9.0.0`. The resulting image is significantly smaller than the default one. ```bash docker images diff --git a/cmd/distribution/custom-packages.yml b/cmd/distribution/custom-packages.yml deleted file mode 100644 index 7cc790367..000000000 --- a/cmd/distribution/custom-packages.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Base address of the Package Registry -address: "https://epr.elastic.co" - -# Queries are executed with each one of the parameters of the matrix. -matrix: - - spec.max: 3.0 - - prerelease: true - spec.max: 3.0 - -# Queries to execute to discover packages >8.18.0. -queries: - - kibana.version: 8.18.0 - spec.max: 3.3 - - kibana.version: 8.18.1 - spec.max: 3.3 - - kibana.version: 8.18.2 - spec.max: 3.3 - - kibana.version: 8.19.0 - spec.max: 3.4 - - kibana.version: 9.0.0 - spec.min: 2.3 - spec.max: 3.3 - - kibana.version: 9.0.1 - spec.min: 2.3 - spec.max: 3.3 - - kibana.version: 9.0.2 - spec.min: 2.3 - spec.max: 3.3 - - kibana.version: 9.1.0 - spec.min: 2.3 - spec.max: 3.4 - - kibana.version: 9.1.0 - spec.min: 2.3 - spec.max: 3.5 - - -actions: - - print: - - download: - destination: ./build/distribution diff --git a/cmd/distribution/examples/custom-packages.yml b/cmd/distribution/examples/custom-packages.yml new file mode 100644 index 000000000..a8a1f8d4b --- /dev/null +++ b/cmd/distribution/examples/custom-packages.yml @@ -0,0 +1,22 @@ +# Base address of the Package Registry +address: "https://epr.elastic.co" + +# Queries are executed with each one of the parameters of the matrix. +matrix: + - spec.max: 3.5 + - prerelease: true + spec.max: 3.5 + +# Queries to execute to discover packages >8.18.0 & >9.0.0. +queries: + - kibana.version: 8.18.0 + spec.max: 3.4 + - kibana.version: 9.0.0 + spec.min: 2.3 + spec.max: 3.4 + + +actions: + - print: + - download: + destination: ./build/distribution From e97228784e7397471ce0dc4741f682483547072c Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Tue, 24 Feb 2026 11:17:53 +0100 Subject: [PATCH 07/10] fix: Rename package file to .yaml, adapt path, add pointer to distribution Readme.md --- Dockerfile.custom-registry | 4 ++-- README.md | 2 +- .../examples/{custom-packages.yml => custom-packages.yaml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename cmd/distribution/examples/{custom-packages.yml => custom-packages.yaml} (100%) diff --git a/Dockerfile.custom-registry b/Dockerfile.custom-registry index ac1649795..9baa681dd 100644 --- a/Dockerfile.custom-registry +++ b/Dockerfile.custom-registry @@ -16,9 +16,9 @@ RUN make -C cmd/distribution release-${TARGETPLATFORM:-linux/amd64} # STAGE 2: Run the 'distribution' tool to download packages FROM distribution-builder AS packager # Copy the custom configuration for the packages we want -COPY ./cmd/distribution/custom-packages.yml . +COPY ./cmd/distribution/examples/custom-packages.yaml . # Run the tool. It will create the packages in 'build/distribution/' -RUN ./cmd/distribution/distribution ./cmd/distribution/custom-packages.yml +RUN ./cmd/distribution/distribution ./cmd/distribution/examples/custom-packages.yaml # STAGE 3: Build the final 'package-registry' binary diff --git a/README.md b/README.md index c44f801bf..e46776a87 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ The official Docker container for the Elastic Package Registry includes all avai To build your own custom Elastic Package Registry container image, follow these steps: -1. **Define Your Package Set**: Create or modify the `cmd/distribution/examples/custom-packages.yml` file to specify the desired package versions. You can filter by `kibana.version`, `spec.max`, and other criteria. +1. **Define Your Package Set**: Create or modify the `cmd/distribution/examples/custom-packages.yaml` file to specify the desired package versions. You can filter by `kibana.version`, `spec.max`, and other criteria. All the available settings are documented in the distribution [README](./cmd/distribution/README.md) 2. **Build the Image**: Run the following command from the root of the repository to build your custom image. diff --git a/cmd/distribution/examples/custom-packages.yml b/cmd/distribution/examples/custom-packages.yaml similarity index 100% rename from cmd/distribution/examples/custom-packages.yml rename to cmd/distribution/examples/custom-packages.yaml From 8e56e9839ecb2c1356f61fde03b3930ce9a176b2 Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Tue, 24 Feb 2026 11:18:30 +0100 Subject: [PATCH 08/10] fix: changed GO_VERSION default value --- Dockerfile.custom-registry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.custom-registry b/Dockerfile.custom-registry index 9baa681dd..0d3199c50 100644 --- a/Dockerfile.custom-registry +++ b/Dockerfile.custom-registry @@ -1,6 +1,6 @@ # This image contains the package-registry binary AND a pre-warmed set of packages. -ARG GO_VERSION=1.24 +ARG GO_VERSION=1.25.7 ARG BUILDER_IMAGE=golang ARG RUNNER_IMAGE=cgr.dev/chainguard/wolfi-base From 2d1d4c6077e9661dc50dcc0ab54e588e38ac25a2 Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Tue, 24 Feb 2026 11:19:25 +0100 Subject: [PATCH 09/10] fix: changed build docker build to map GO_VERSION dynamic value --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e46776a87..c20f8fa55 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ To build your own custom Elastic Package Registry container image, follow these > **Note**: If you use a different configuration file than the default, remember to update the `Dockerfile.custom-registry` accordingly. ```bash -docker build -f Dockerfile.custom-registry -t custom-package-registry . +docker build --build-arg GO_VERSION="$(cat .go-version)" -f Dockerfile.custom-registry -t custom-package-registry . ``` **Example: Smaller Image Footprint** From 32512ffe5ca2d78a16e21c34ce813c25ffb9adb1 Mon Sep 17 00:00:00 2001 From: fred-maussion Date: Tue, 24 Feb 2026 11:20:06 +0100 Subject: [PATCH 10/10] fix: revert ELASTIC_APM_ACTIVE documentation --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c20f8fa55..fb635b5e0 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,6 @@ information collected for requests in the [APM Guide](https://www.elastic.co/gui You can configure the agent to send the data to any APM Server using the following environment variables: -* `ELASTIC_APM_ACTIVE`: Boolean to activate the APM. * `ELASTIC_APM_SERVER_URL`: Address of the APM Server. Instrumentation is disabled in Package Registry if this variable is not set. * `ELASTIC_APM_API_KEY`: API key to use to authenticate with the APM Server, if needed.