From 80fb9279939dc69f75ee00f5b1cb0d79f3859639 Mon Sep 17 00:00:00 2001 From: wangchong1995924 <15229716099@163.com> Date: Mon, 25 Mar 2024 16:04:58 +0800 Subject: [PATCH] delete docker image __pycache__ file --- script/step/make_docker_image.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/step/make_docker_image.sh b/script/step/make_docker_image.sh index 89a38ba..0f25b22 100644 --- a/script/step/make_docker_image.sh +++ b/script/step/make_docker_image.sh @@ -99,6 +99,7 @@ function make_docker_image_inchroot() sed -i "/obs_repo_here/a " "${BUILD_SCRIPT_DIR}"/config/docker_image/config.xml done cp -a "${BUILD_SCRIPT_DIR}"/config/docker_image/config.xml "${cfg_dir}"/config.xml + sed -i "/exit/i python3 -c \"import pathlib;import shutil;[shutil.rmtree(p) for p in pathlib.Path('/').rglob('__pycache__')]\"" "${BUILD_SCRIPT_DIR}/config/docker_image/images.sh" cp "${BUILD_SCRIPT_DIR}"/config/docker_image/images.sh "${cfg_dir}" chmod 700 /var/run/screen/S-root -- Gitee