orioledb 集成 citus docker 镜像

主要打算集成orioledb以及citus,基于了citus 官方的docker 镜像,进行了简单的修改

参考修改

使用了alpine 基础镜像

FROM orioledb/orioledb
ARG VERSION=11.0.5
LABEL maintainer="Citus Data https://citusdata.com" \
      org.label-schema.name="Citus" \
      org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \
      org.label-schema.url="https://www.citusdata.com" \
      org.label-schema.vcs-url="https://github.com/citusdata/citus" \
      org.label-schema.vendor="Citus Data, Inc." \
      org.label-schema.version=${VERSION}-alpine \
      org.label-schema.schema-version="1.0"
 
# Build citus and delete all used libraries. Warning: Libraries installed in this section will be deleted after build completion
RUN apk add --no-cache \
            --virtual builddeps \
        build-base \
        krb5-dev \
        curl \
        curl-dev \
        openssl-dev \
        ca-certificates \
        clang \
        llvm \
        lz4-dev \
        zstd-dev \
        libxslt-dev \
        libxml2-dev \
        icu-dev && \
    apk add --no-cache libcurl && \
    curl -sfLO "https://github.com/citusdata/citus/archive/v${VERSION}.tar.gz" && \
    tar xzf "v${VERSION}.tar.gz" && \
    cd "citus-${VERSION}" && \
   ./configure --with-security-flags && \
    make install && \
    cd .. && \
    rm -rf "citus-${VERSION}" "v${VERSION}.tar.gz" && \
    apk del builddeps
 
#--------End of Citus Build
 
# add citus to default PostgreSQL config
RUN echo "shared_preload_libraries='citus,orioledb'" >> /usr/local/share/postgresql/postgresql.conf.sample
 
# add scripts to run after initdb
COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/
 
# add health check script
COPY pg_healthcheck /
 
# entry point unsets PGPASSWORD, but we need it to connect to workers
# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303
RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh
 
# Add lz4 dependencies
RUN apk add zstd zstd-dev lz4 lz4-dev
 
HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck

说明

orioledb集成citus主要使用了citus官方镜像的模版,基础镜像修改为了orioledb的,同时开启了orioledb 以及citus,后续会进行一些集成尝试

参考资料

https://github.com/citusdata/docker

posted on 2022-08-14 00:26  荣锋亮  阅读(93)  评论(0编辑  收藏  举报

导航