when execute openresty-proxy-cache/build, if openresty already exists [error] fatal: destination path 'openresty' already exists and is not an empty directory.
[how] delete openresty before git clone.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- container/openresty-proxy-cache/build | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/container/openresty-proxy-cache/build b/container/openresty-proxy-cache/build index 0846197..507c4fe 100755 --- a/container/openresty-proxy-cache/build +++ b/container/openresty-proxy-cache/build @@ -2,6 +2,8 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+[ -d "openresty" ] && rm -rf openresty + git clone https://gitee.com/cuiyili/openresty.git || exit 1
docker build -t openresty:proxy_cache . -f openresty/Dockerfile