wal2json Dockerfile

Posted rongfengliang-荣锋亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了wal2json Dockerfile相关的知识,希望对你有一定的参考价值。

以下是一个wal2json pg扩展的dockerfile,方便测试使用

dockerfile

FROM postgres:11.2 AS build
ENV VERSION 1_0
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/

说明

此dockerfile ,暂时还没经过完备测试,可能还会有bug, dockerhub 镜像dalongrong/wal2json:1.0

参考资料

https://github.com/eulerto/wal2json/releases

以上是关于wal2json Dockerfile的主要内容,如果未能解决你的问题,请参考以下文章

一款PostgreSQL WAL日志解析工具: wal2json

如何为 Alpine Linux 中的进程提供`__snprintf_chk`

Dockerfile 应该提交到哪个代码存储库?

详解Dockerfile之实战项目

构建 Dockerfile 使用非零代码 139 执行

dockerfile部署goweb项目