zoukankan      html  css  js  c++  java
  • wal2json 2.3 dockerfile

    wal2json 发布2.3 版本了,有好多新特性,以下是一个新特性的dokerfile

    dockerfile

    FROM postgres:11.2 AS build
    ENV VERSION 2_3
    RUN buildDeps="curl build-essential ca-certificates git pkg-config glib2.0 postgresql-server-dev-$PG_MAJOR" 
        && apt-get update 
        && apt-get install -y --no-install-recommends ${buildDeps} 
        && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list 
        && curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - 
        && apt-get update 
        && apt-get install -y --no-install-recommends libc++1 postgresql-server-dev-$PG_MAJOR 
        && mkdir -p /tmp/build 
        && curl -o /tmp/build/${VERSIONN}.tar.gz -SL "https://github.com/eulerto/wal2json/archive/wal2json_${VERSION}.tar.gz" 
        && cd /tmp/build/ 
        && tar -xzf /tmp/build/${VERSIONN}.tar.gz -C /tmp/build/ 
        && cd /tmp/build/wal2json-wal2json_${VERSION} 
        && make && make install 
        && cd / 
        && rm -rf /tmp/build 
        && apt-get remove -y --purge ${buildDeps} 
        && apt-get autoremove -y --purge 
        && rm -rf /var/lib/apt/lists/
    RUN echo "max_replication_slots = 1" >> /usr/share/postgresql/postgresql.conf.sample
    RUN echo "wal_level = logical" >> /usr/share/postgresql/postgresql.conf.sample
     
     

    说明

    docker 镜像我已经push docker hub 了dalongrong/wal2json:origin-2.3, 一个不好的消息是docker hub 调整免费策略了,免费用户docker 镜像保留
    6个月,后边有可能就被删除了。。。。

    参考资料

    https://github.com/eulerto/wal2json
    https://www.docker.com/pricing/retentionfaq

  • 相关阅读:
    mysql六:数据备份、pymysql模块
    mysql五:索引原理与慢查询优化
    mysql四:数据操作
    sql查询作业答案
    mysql四-2:多表查询
    mysql四-1:单表查询
    mysql五补充部分:SQL逻辑查询语句执行顺序
    mysql三-3:完整性约束
    mysql三:表操作
    mysql三-2:数据类型
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/13499537.html
Copyright © 2011-2022 走看看