From e5d337e5bd9b36e785845c26f7a950848170507d Mon Sep 17 00:00:00 2001 From: Endial Fang Date: Wed, 22 Jul 2020 09:08:07 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E8=84=9A=E6=9C=AC=E6=96=87=E4=BB=B6Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..38506ab --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +# Ver: 1.0 by Endial Fang (endial@126.com) +# +# 当前 Docker 镜像的编译脚本 + +current_branch := $(shell git rev-parse --abbrev-ref HEAD) + +# Sources List: default / tencent / ustc / aliyun / huawei +build-arg := --build-arg apt_source=tencent + +# 设置本地下载服务器路径,加速调试时的本地编译速度 +build-arg += --build-arg local_url=http://192.168.48.132/dist-files/ + +build: + docker rmi alpine:$(current_branch) || true + docker build --force-rm $(build-arg) -t alpine:$(current_branch) .