def _run_proxy_server(self): logging.info(f"Running Proxy Server {self.name}") run_flags = [ "-d", "--restart=always", "--network=host", f"--volume {self.config_dir_path}:/etc/squid/", f"--publish {self.port}:{self.port}", ] utils.run_container(container_name=self.dir, image=self.image, flags=run_flags)
def _run_proxy_server(self): logging.info(f'Running Proxy Server {self.name}') run_flags = [ '-d', '--restart=always', '--network=host', f'--volume {self.config_dir_path}:/etc/squid/', f'--publish {self.port}:{self.port}' ] utils.run_container(container_name=self.dir, image=self.image, flags=run_flags)
def embed(image_name, ignition_file, embed_image_name): logging.info("Embed ignition %s to iso %s", ignition_file, image_name) embedded_image = os.path.join(BUILD_DIR, embed_image_name) os.remove(embedded_image) if os.path.exists(embedded_image) else None flags = shlex.split("--privileged --rm -v /dev:/dev -v /run/udev:/run/udev -v .:/data -w /data") utils.run_container("coreos-installer", "quay.io/coreos/coreos-installer:release", flags, f"iso ignition embed {BUILD_DIR}/{image_name} " f"-f --ignition-file /data/{IBIP_DIR}/{ignition_file} -o /data/{embedded_image}") image_path = os.path.join(consts.BASE_IMAGE_FOLDER, embed_image_name) shutil.move(embedded_image, image_path) return image_path