@@ -28,19 +28,14 @@ def start_container(
2828 text = True ,
2929 )
3030
31- def update ():
32- return
33- update_acng_conf (config )
34- update_mirrors (config )
35-
3631 if result .stdout .strip ():
37- update ()
3832 click .secho (f"Container '{ container_name } ' is already running." )
3933 return
4034
4135 create_network (network )
42- cmd = ["docker" , "build" , "-t" , image_name , "." ]
43- subprocess .run (cmd , check = True , cwd = config .dirs ["images" ] / "apt_cacher" )
36+ if build_path :
37+ cmd = ["docker" , "build" , "-t" , image_name , "." ]
38+ subprocess .run (cmd , check = True , cwd = build_path )
4439
4540 # If not running, start it
4641 result = subprocess .run (
@@ -78,9 +73,6 @@ def update():
7873 except subprocess .CalledProcessError as e :
7974 abort (str (e ))
8075
81- update ()
82-
83-
8476def start_squid_proxy (config ):
8577 image_name = "squid-deb-cacher-wodoo"
8678 start_container (
@@ -89,7 +81,7 @@ def start_squid_proxy(config):
8981 image_name ,
9082 config .dirs ["images" ] / "apt_cacher" ,
9183 network = "aptcache-net" ,
92- port_mapping = "3142 :8000" ,
84+ port_mapping = config . APT_PROXY_IP + " :8000" ,
9385 )
9486
9587
@@ -101,7 +93,7 @@ def start_proxpi(config):
10193 image_name ,
10294 None ,
10395 network = "proxpi-net" ,
104- port_mapping = "3143:8000 " ,
96+ port_mapping = config . PIP_PROXY_IP + ":5000 " ,
10597 )
10698
10799
0 commit comments