From c5a876e74fa030eae5ba30ce92e05b8d7eebc6c5 Mon Sep 17 00:00:00 2001 From: macmacal Date: Tue, 26 Aug 2025 11:38:36 +0200 Subject: [PATCH 1/4] self-hosted containers registry --- .gitignore | 4 ++ utils/containers_registry/README.md | 60 ++++++++++++++++++++ utils/containers_registry/docker-compose.yml | 10 ++++ 3 files changed, 74 insertions(+) create mode 100644 utils/containers_registry/README.md create mode 100644 utils/containers_registry/docker-compose.yml diff --git a/.gitignore b/.gitignore index 5ba29d0..f034e46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ # Debian packages *.deb + +# Containers registry blobs +data +link \ No newline at end of file diff --git a/utils/containers_registry/README.md b/utils/containers_registry/README.md new file mode 100644 index 0000000..8986ed8 --- /dev/null +++ b/utils/containers_registry/README.md @@ -0,0 +1,60 @@ +# Containers registry + +This service allows to self-host container registry for Podman/Docker. + +Based on [this](https://infotechys.com/host-your-own-podman-registry/) tutorial. + + +## Preapre the host +```bash +export REGISTRY_PATH=/var/lib/registry +sudo mkdir -p $REGISTRY_PATH +``` + +## Run the service +```bash +podman-compose up -d +# or +docker compose up -d +``` + +## Setup the clients +The easiest way is to provide the registry adress manually: +```bash +sudo vim /etc/containers/registries.conf +``` + +Assuming that `HOSTNAME` is your host IP adress: +``` +[[registry]] +location = "HOSTNAME:5000" +insecure = true +``` + +> [!WARNING] +> This configuration is NOT SAFE. Consider setting up proper SSL certificates before running on your machine. + +Restart the contenerization engine: +```bash +sudo systemctl restart podman +# or +sudo systemctl restart docker +``` + +## Use it + +### Push +```bash +podman images +podman tag localhost/example:latest HOSTNAME:5000/example:latest +podman push HOSTNAME:5000/example:latest +``` + +### Pull +```bash +podman pull HOSTNAME:5000/example:latest +podman images +``` + +--- +[Back to main README](../../README.md) \ No newline at end of file diff --git a/utils/containers_registry/docker-compose.yml b/utils/containers_registry/docker-compose.yml new file mode 100644 index 0000000..c739cb1 --- /dev/null +++ b/utils/containers_registry/docker-compose.yml @@ -0,0 +1,10 @@ +services: + containers_registry: + image: docker.io/library/registry:2 + container_name: containers_registry + privileged: true + restart: always + ports: + - "5000:5000" + volumes: + - ./registry:/var/lib/registry From 9699d6168cc59ecff68e917a3a9d112a14dc2565 Mon Sep 17 00:00:00 2001 From: macmacal Date: Tue, 26 Aug 2025 11:38:45 +0200 Subject: [PATCH 2/4] updated READMEs --- README.md | 11 +++++++++-- utils/aegis_packages/README.md | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index daf5ee6..82f4eeb 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,23 @@ toolbox list toolbox enter aegis_dev-latest ``` +--- + ### Private Packages Repo (PPA) -How to Set up private repo [here](utils/aegis_packages/README.md). +How to Set up private repo [here](./utils/aegis_packages/README.md). **Adding private repo** ```bash echo "deb [trusted=yes] http://192.168.0.100/debian ./" | tee -a /etc/apt/sources.list > /dev/null ``` +### Containers registry + +[Instructions how to use self-hosted container registry.](./utils/containers_registry/README.md) + +--- -#### Known issues: +### Known issues: ##### `sudo`: unable to resolve host `toolbox` / `toolbx` diff --git a/utils/aegis_packages/README.md b/utils/aegis_packages/README.md index b4b2f5f..a8a45d9 100644 --- a/utils/aegis_packages/README.md +++ b/utils/aegis_packages/README.md @@ -35,3 +35,6 @@ docker compose up -d ### Adding new packages Follow `Preparing packages` step and the list of packages will automatically update. + +--- +[Back to main README](../../README.md) \ No newline at end of file From 2e9cb299b5accbadec46bb9f6d7db4d514c66a9f Mon Sep 17 00:00:00 2001 From: macmacal Date: Tue, 26 Aug 2025 11:43:48 +0200 Subject: [PATCH 3/4] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27628b4..31219de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- [PR-11](https://github.com/AGH-CEAI/aegis_docker/pull/11) - Added Container for PPA server. +- [PR-13](https://github.com/AGH-CEAI/aegis_docker/pull/13) - Added compose for containers registry. +- [PR-11](https://github.com/AGH-CEAI/aegis_docker/pull/11) - Added container for PPA server. - [PR-9](https://github.com/AGH-CEAI/aegis_docker/pull/9) - Added documentation for using toolbx containers in Ubuntu 22.04/24.04. - [PR-4](https://github.com/AGH-CEAI/aegis_docker/pull/4) - Added instructions how to handle `sudo` issues in toolbx. - [PR-1](https://github.com/AGH-CEAI/aegis_docker/pull/1) - Initial version of the Aegis development container. From ad73ecf0c4b84666a2072f032f109bbd7fcb659e Mon Sep 17 00:00:00 2001 From: macmacal Date: Tue, 26 Aug 2025 11:46:43 +0200 Subject: [PATCH 4/4] fmt & typos --- .gitignore | 2 +- utils/aegis_packages/README.md | 2 +- utils/containers_registry/README.md | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f034e46..003de9c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ # Containers registry blobs data -link \ No newline at end of file +link diff --git a/utils/aegis_packages/README.md b/utils/aegis_packages/README.md index a8a45d9..8912f57 100644 --- a/utils/aegis_packages/README.md +++ b/utils/aegis_packages/README.md @@ -37,4 +37,4 @@ docker compose up -d Follow `Preparing packages` step and the list of packages will automatically update. --- -[Back to main README](../../README.md) \ No newline at end of file +[Back to main README](../../README.md) diff --git a/utils/containers_registry/README.md b/utils/containers_registry/README.md index 8986ed8..035e22d 100644 --- a/utils/containers_registry/README.md +++ b/utils/containers_registry/README.md @@ -5,7 +5,7 @@ This service allows to self-host container registry for Podman/Docker. Based on [this](https://infotechys.com/host-your-own-podman-registry/) tutorial. -## Preapre the host +## Prepare the host ```bash export REGISTRY_PATH=/var/lib/registry sudo mkdir -p $REGISTRY_PATH @@ -19,12 +19,12 @@ docker compose up -d ``` ## Setup the clients -The easiest way is to provide the registry adress manually: +The easiest way is to provide the registry address manually: ```bash sudo vim /etc/containers/registries.conf ``` -Assuming that `HOSTNAME` is your host IP adress: +Assuming that `HOSTNAME` is your host IP address: ``` [[registry]] location = "HOSTNAME:5000" @@ -57,4 +57,4 @@ podman images ``` --- -[Back to main README](../../README.md) \ No newline at end of file +[Back to main README](../../README.md)