-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Description
Sometimes it would be interesting to customize the packages available in the docker distribution images (e.g. docker.elastic.co/package-registry/distribution:9.0.1) to include other packages.
This is also interesting for air-gapped environments.
For instance, there could be some content packages that are not available in the current docker images or maybe it is needed to add custom built packages too.
The steps to follow would be the next ones:
- Download all the required packages from Elastic Package Registry (https://epr.elsatic.co) and their corresponding signatures into a new folder (e.g. packages). For instance:
mkdir -p packages cd packages wget "https://epr.elastic.co/epr/kubernetes_otel/kubernetes_otel-1.1.0.zip" wget "https://epr.elastic.co/epr/kubernetes_otel/kubernetes_otel-1.1.0.zip.sig" ...
- Get the current configuration of the docker distribution image:
# Current configuration $ docker run --rm -it \ --entrypoint /bin/cat \ docker.elastic.co/package-registry/distribution:8.17.2 /package-registry/config.yml package_paths: - /packages/package-storage cache_time.search: 1m cache_time.categories: 10m cache_time.catch_all: 10m - Based on that configuration, create a new configuration file
config.ymladding a new path underpackage_pathskey:- Example adding
/packages/customfolder (to be used as a volume mount in next step):
$ cat config.yml package_paths: - /packages/package-storage - /packages/custom cache_time.search: 1m cache_time.categories: 10m cache_time.catch_all: 10m
- Example adding
- Finally, they should run the distribution docker mounting both the configuration file and the new folder with the packages (along with all the other needed parameters according to the air-gapped docs)
- This would be a minimal example without any TLS or any other flags
docker run --rm -it \ -v ./config.yml:/package-registry/config.yml \ -v ./packages:/packages/custom \ docker.elastic.co/package-registry/distribution:9.0.1
- This would be a minimal example without any TLS or any other flags
Resources
IIRC there are these docs about how to run Elastic Package Registry in air-gapped environments: https://www.elastic.co/docs/reference/fleet/air-gapped#air-gapped-diy-epr
I'm not sure if there would be other related docs.
Collaboration
The product team will provide the initial content.
Point of contact.
Main contact: @mrodm
Stakeholders: @elastic/ecosystem