Signed-off-by: cuiyili 2268260388@qq.com --- container/openresty-proxy-cache/start | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 container/openresty-proxy-cache/start
diff --git a/container/openresty-proxy-cache/start b/container/openresty-proxy-cache/start new file mode 100755 index 0000000..b946426 --- /dev/null +++ b/container/openresty-proxy-cache/start @@ -0,0 +1,23 @@ +#!/bin/bash +# Refer to: https://hub.docker.com/r/openresty/openresty +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# SPDX-License-Identifier: MulanPSL-2.0+ + +. $CCI_SRC/container/defconfig.sh + +docker_rm openresty-proxy-cache + +cmd=( + docker run -d + --name openresty-proxy-cache + --restart=always + -p 11333:80 + -p 11334:443 + -v $PWD/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf + -v $PWD/lua_script/forward.lua:/usr/local/openresty/nginx/lua_script/forward.lua + -v /srv/initrd/tar:/srv/initrd/tar:ro + -v /etc/localtime:/etc/localtime:ro + openresty:proxy_cache +) + +"${cmd[@]}"