File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 365365sudo sed -i " /${LOCAL_REGISTRY_DNS_NAME} /d"   /etc/hosts
366366echo  " ${PROVISIONING_HOST_EXTERNAL_IP}  ${LOCAL_REGISTRY_DNS_NAME} "   |  sudo tee -a /etc/hosts
367367
368+ #  Make sure any squid containers get the registry name, and make squid
369+ #  reload it's config.
370+ for  container  in  $( podman ps --format " {{.Names}}"   |  grep squid) ;  do 
371+   echo  " Updating /etc/hosts in container: $container " 
372+   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" 
373+ done 
374+ 
368375if  use_registry " podman" ;  then 
369376    #  Remove any previous file, or podman login panics when reading the
370377    #  blank authfile with a "assignment to entry in nil map" error
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments