[fix:11]更换PostgreSQL源路径;增加Makefile文件

This commit is contained in:
2020-07-25 12:09:48 +08:00
parent 6fbf81470e
commit cf3ebbb242
2 changed files with 18 additions and 2 deletions
+3 -2
View File
@@ -79,6 +79,7 @@ RUN set -eux; \
fetchDeps=" \ fetchDeps=" \
dirmngr \ dirmngr \
gnupg \ gnupg \
libicu-dev \
"; \ "; \
savedAptMark="$(apt-mark showmanual) ${appDeps}"; \ savedAptMark="$(apt-mark showmanual) ${appDeps}"; \
apt-get update; \ 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 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/ bionic-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 update; \
apt-get install -y --no-install-recommends ${appDeps}; \ apt-get install -y --no-install-recommends ${appDeps}; \
\ \
+15
View File
@@ -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) .