From cf3ebbb2425a6fa193d958a3baad2a0b72089729 Mon Sep 17 00:00:00 2001 From: Endial Fang Date: Sat, 25 Jul 2020 12:09:48 +0800 Subject: [PATCH] =?UTF-8?q?[fix:11]=E6=9B=B4=E6=8D=A2PostgreSQL=E6=BA=90?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=EF=BC=9B=E5=A2=9E=E5=8A=A0Makefile=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +++-- Makefile | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index cae657e..85d32c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,6 +79,7 @@ RUN set -eux; \ fetchDeps=" \ dirmngr \ gnupg \ + libicu-dev \ "; \ savedAptMark="$(apt-mark showmanual) ${appDeps}"; \ apt-get update; \ @@ -100,8 +101,8 @@ RUN set -eux; \ \ \ # 增加软件包特有源,并使用系统包管理方式安装软件 - echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main ${APP_VERSION}" >> /etc/apt/sources.list; \ - echo "deb-src http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main ${APP_VERSION}" >> /etc/apt/sources.list; \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main ${APP_VERSION}" >> /etc/apt/sources.list; \ + echo "deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main ${APP_VERSION}" >> /etc/apt/sources.list; \ apt-get update; \ apt-get install -y --no-install-recommends ${appDeps}; \ \ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d9d4aae --- /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 postgres:$(current_branch) || true + docker build --force-rm $(build-arg) -t postgres:$(current_branch) .