We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7ce3f4 commit 451d83fCopy full SHA for 451d83f
02_configure_host.sh
@@ -365,6 +365,12 @@ fi
365
sudo sed -i "/${LOCAL_REGISTRY_DNS_NAME}/d" /etc/hosts
366
echo "${PROVISIONING_HOST_EXTERNAL_IP} ${LOCAL_REGISTRY_DNS_NAME}" | sudo tee -a /etc/hosts
367
368
+# Make sure any squid containers get the registry name too
369
+for container in $(podman ps --format "{{.Names}}" | grep squid); do
370
+ echo "Updating /etc/hosts in container: $container"
371
+ podman exec -it "$container" sh -c "grep -v '${LOCAL_REGISTRY_DNS_NAME}' /etc/hosts > /tmp/hosts && echo '${PROVISIONING_HOST_EXTERNAL_IP} ${LOCAL_REGISTRY_DNS_NAME}' >> /tmp/hosts && cp -f /tmp/hosts /etc/hosts"
372
+done
373
+
374
if use_registry "podman"; then
375
# Remove any previous file, or podman login panics when reading the
376
# blank authfile with a "assignment to entry in nil map" error
0 commit comments