[fix:12]针对aliyun容器服务器,修改默认仓库地址;修改默认源服务器为aliyun
This commit is contained in:
+15
-7
@@ -1,11 +1,12 @@
|
||||
# Ver: 1.2 by Endial Fang (endial@126.com)
|
||||
# Ver: 1.4 by Endial Fang (endial@126.com)
|
||||
#
|
||||
|
||||
# 预处理 =========================================================================
|
||||
FROM colovu/dbuilder as builder
|
||||
ARG registry_url="registry.cn-shenzhen.aliyuncs.com"
|
||||
FROM ${registry_url}/colovu/dbuilder as builder
|
||||
|
||||
# sources.list 可使用版本:default / tencent / ustc / aliyun / huawei
|
||||
ARG apt_source=default
|
||||
ARG apt_source=aliyun
|
||||
|
||||
# 编译镜像时指定用于加速的本地服务器地址
|
||||
ARG local_url=""
|
||||
@@ -13,7 +14,10 @@ ARG local_url=""
|
||||
ENV APP_NAME=postgresql \
|
||||
APP_VERSION=12.4
|
||||
|
||||
# 选择软件包源(Optional),以加速后续软件包安装
|
||||
RUN select_source ${apt_source};
|
||||
|
||||
# 安装依赖的软件包及库(Optional)
|
||||
RUN install_pkg bison flex libedit-dev libxml2-dev libxslt-dev zlib1g-dev libreadline-dev uuid-dev \
|
||||
libperl-dev libicu-dev libxslt1-dev libssl-dev libldap2-dev libkrb5-dev libpam0g-dev libselinux1-dev;
|
||||
|
||||
@@ -91,10 +95,14 @@ RUN set -eux; \
|
||||
cut -d: -f1 | \
|
||||
sort -u >/usr/local/${APP_NAME}/runDeps;
|
||||
|
||||
# 镜像生成 ========================================================================
|
||||
FROM colovu/debian:10
|
||||
|
||||
ARG apt_source=default
|
||||
# 镜像生成 ========================================================================
|
||||
FROM ${registry_url}/colovu/debian:10
|
||||
|
||||
# sources.list 可使用版本:default / tencent / ustc / aliyun / huawei
|
||||
ARG apt_source=aliyun
|
||||
|
||||
# 编译镜像时指定用于加速的本地服务器地址
|
||||
ARG local_url=""
|
||||
|
||||
ENV APP_NAME=postgresql \
|
||||
@@ -105,7 +113,7 @@ ENV APP_NAME=postgresql \
|
||||
ENV APP_HOME_DIR=/usr/local/${APP_NAME} \
|
||||
APP_DEF_DIR=/etc/${APP_NAME}
|
||||
|
||||
ENV PATH="${APP_HOME_DIR}/bin:${PATH}" \
|
||||
ENV PATH="${APP_HOME_DIR}/bin:${APP_HOME_DIR}/sbin:${PATH}" \
|
||||
LD_LIBRARY_PATH="${APP_HOME_DIR}/lib"
|
||||
|
||||
LABEL \
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Ver: 1.4 by Endial Fang (endial@126.com)
|
||||
# Ver: 1.7 by Endial Fang (endial@126.com)
|
||||
#
|
||||
# 当前 Docker 镜像的编译脚本
|
||||
|
||||
registry_url :=registry.cn-shenzhen.aliyuncs.com
|
||||
app_name :=colovu/postgres
|
||||
|
||||
# 生成镜像TAG,类似:
|
||||
@@ -46,16 +47,6 @@ clean:
|
||||
@echo "Clean all images for current application..."
|
||||
@docker images | grep "$(app_name) " | awk '{print $$3}' | sort -u | xargs -L 1 docker rmi -f
|
||||
|
||||
tag:
|
||||
@echo "Add tag: $(local_registory)/$(app_name):latest"
|
||||
@docker tag $(app_name):latest $(local_registory)/$(app_name):latest
|
||||
|
||||
push: tag
|
||||
@echo "Push: $(local_registory)/$(app_name):latest"
|
||||
@docker push $(local_registory)/$(app_name):latest
|
||||
@echo "Push: $(app_name):latest"
|
||||
@docker push $(app_name):latest
|
||||
|
||||
# 更新所有 colovu 仓库的镜像
|
||||
upgrade:
|
||||
@echo "Upgrade all images..."
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
针对 [PostgreSQL](https://www.postgresql.org) 应用的 Docker 镜像,用于提供 PostgreSQL 服务。
|
||||
|
||||
详细信息可参照:[PostgreSQL10手册](http://www.postgres.cn/docs/10/)及[PostgreSQL11手册](http://www.postgres.cn/docs/11/)
|
||||
详细信息可参照:[PostgreSQL10手册](http://www.postgres.cn/docs/10/)及[PostgreSQL12手册](http://www.postgres.cn/docs/12/)
|
||||
|
||||
<img src="img/postgresql-logo.png" alt="postgresql-logo" style="zoom: 33%;" />
|
||||
|
||||
**版本信息:**
|
||||
|
||||
- 11、latest
|
||||
- 12、latest
|
||||
- 10
|
||||
|
||||
**镜像信息:**
|
||||
|
||||
* 镜像地址:colovu/postgres:latest
|
||||
* 镜像地址:registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
Docker 快速启动命令:
|
||||
|
||||
```shell
|
||||
$ docker run -d -e ALLOW_ANONYMOUS_LOGIN=yes colovu/postgres
|
||||
$ docker run -d -e ALLOW_ANONYMOUS_LOGIN=yes registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12
|
||||
```
|
||||
|
||||
Docker-Compose 快速启动命令:
|
||||
@@ -94,7 +94,7 @@ services:
|
||||
#### 通过默认方式启动
|
||||
|
||||
```shell
|
||||
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d colovu/postgres:latest
|
||||
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12
|
||||
```
|
||||
|
||||
- 由容器执行默认的`entrypoint.sh`脚本,并生成默认的用户及数据文件
|
||||
@@ -106,7 +106,7 @@ $ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d colov
|
||||
#### 通过`psql`命令方式启动
|
||||
|
||||
```shell
|
||||
$ docker run -it --rm --network some-network colovu/postgres:latest psql -h some-postgres -U postgres
|
||||
$ docker run -it --rm --network some-network registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12 psql -h some-postgres -U postgres
|
||||
psql (10.12.0)
|
||||
Type "help" for help.
|
||||
|
||||
@@ -131,7 +131,7 @@ version: '3.1'
|
||||
services:
|
||||
|
||||
db:
|
||||
image: colovu/postgres:latest
|
||||
image: registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: example
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ version: '3.8'
|
||||
# 更多配置参数请参考镜像 README.md 文档中说明
|
||||
services:
|
||||
postgres:
|
||||
image: 'colovu/postgres'
|
||||
image: 'registry.cn-shenzhen.aliyuncs.com/colovu/postgres:12'
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user