From 57777e7685f4105e4df707c2e65d3141e1407026 Mon Sep 17 00:00:00 2001 From: Endial Fang Date: Sun, 13 Sep 2020 18:30:40 +0800 Subject: [PATCH] =?UTF-8?q?[fix:6.0]=E6=9B=B4=E6=96=B0Makefile=E4=B8=AD?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=90=8D=E7=A7=B0=E5=AE=9A=E4=B9=89=E5=8F=8A?= =?UTF-8?q?=E6=B8=85=E7=90=86=E8=84=9A=E6=9C=AC=EF=BC=9B=E4=BC=98=E5=8C=96?= =?UTF-8?q?Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- Makefile | 8 ++++---- alpine/Dockerfile | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 753ce4b..bb2db74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,7 +92,7 @@ COPY customer / # 以包管理方式安装软件包(Optional) RUN select_source ${apt_source} -RUN install_pkg libssl1.1 +#RUN install_pkg libssl1.1 RUN create_user && prepare_env @@ -120,3 +120,4 @@ ENTRYPOINT ["entry.sh"] # 应用程序的服务命令,必须使用非守护进程方式运行。如果使用变量,则该变量必须在运行环境中存在(ENV可以获取) CMD ["${APP_EXEC}", "${REDIS_CONF_FILE}"] + diff --git a/Makefile b/Makefile index 4e76259..557822c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # # 当前 Docker 镜像的编译脚本 -app_name := colovu/redis +app_name :=colovu/redis # 生成镜像TAG,类似: # <镜像名>:<分支名>- # Git 仓库且无文件修改直接编译 @@ -38,13 +38,13 @@ build: build-debian build-alpine # 清理悬空的镜像(无TAG)及停止的容器 clean: @echo "Clean untaged images and stoped containers..." - @docker ps -a | grep "Exited" | awk '{print $$1}' | xargs docker rm - @docker images | grep '' | awk '{print $$3}' | xargs docker rmi -f + @docker ps -a | grep "Exited" | awk '{print $$1}' | xargs docker rm | : + @docker images | grep '' | awk '{print $$3}' | xargs docker rmi -f | : # 为了防止删除前缀名相同的镜像,在过滤条件中加入一个空格进行过滤 clearclean: clean @echo "Clean all images for current application..." - @docker images | grep "$(app_name) " | awk '{print $$3}' | xargs docker rmi -f + @docker images | grep "$(app_name) " | awk '{print $$3}' | xargs docker rmi -f | : tag: @echo "Add tag: $(local_registory)/$(app_name):latest" diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 6b014b9..6ca392e 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -92,8 +92,8 @@ LABEL \ COPY customer / # 以包管理方式安装软件包(Optional) -#RUN select_source ${apt_source} -RUN install_pkg openssl +RUN select_source ${apt_source} +#RUN install_pkg libssl1.1 RUN create_user && prepare_env