Skip to content

Commit 63522fe

Browse files
committed
use local container image registry for CI to avoid docker.io ratelimits
1 parent 089d85c commit 63522fe

File tree

1 file changed

+27
-0
lines changed
  • environments/.stackhpc/hooks

1 file changed

+27
-0
lines changed

environments/.stackhpc/hooks/pre.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,30 @@
1515
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/hosts"
1616
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/secrets.yml"
1717
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/test_user.yml"
18+
19+
- hosts: all:!builder
20+
become: yes
21+
gather_facts: false
22+
name: Use local container image registry to avoid docker.io ratelimits
23+
tasks:
24+
- name: Copy registries.conf
25+
copy:
26+
remote_src: true
27+
src: /etc/containers/registries.conf
28+
dest: /etc/containers/registries.conf.orig
29+
- name: Define local registry
30+
tags: podman
31+
blockinfile:
32+
path: /etc/containers/registries.conf
33+
block: |
34+
[[registry]]
35+
prefix = "192.168.3.95:5000"
36+
location = "192.168.3.95:5000"
37+
insecure = true
38+
- name: Use local registry for unqualified searches
39+
tags: podman
40+
community.general.ini_file: # actually TOML but this is OK here
41+
path: /etc/containers/registries.conf
42+
section: null
43+
option: unqualified-search-registries
44+
value: ['192.168.3.95:5000', 'registry.access.redhat.com', 'registry.redhat.io', 'docker.io']

0 commit comments

Comments
 (0)