Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ fi
sudo sed -i "/${LOCAL_REGISTRY_DNS_NAME}/d" /etc/hosts
echo "${PROVISIONING_HOST_EXTERNAL_IP} ${LOCAL_REGISTRY_DNS_NAME}" | sudo tee -a /etc/hosts

# Make sure any squid containers get the registry name, and make squid
# reload it's config.
for container in $(podman ps --format "{{.Names}}" | grep squid); do
echo "Updating /etc/hosts in container: $container"
sudo 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 && kill -HUP 1"
done

if use_registry "podman"; then
# Remove any previous file, or podman login panics when reading the
# blank authfile with a "assignment to entry in nil map" error
Expand Down