postgresql 在alpine Linux中安装timescaledb-toolkit

axzmvihb  于 2023-10-18  发布在  PostgreSQL
关注(0)|答案(2)|浏览(221)

我有一个使用https://github.com/timescale/timescaledb生成的docker镜像
我的Docker镜像的基础操作系统是Alpine。找不到任何使用apk安装工具包的文档

n8ghc7c1

n8ghc7c11#

timescaledb-ha也包含timescaledb-toolkit。
如果您需要构建自定义映像,可以在此处了解如何实现它。

zc0qhyus

zc0qhyus2#

我在我的dockerfile中使用下面的部分来安装timescaledb-toolkit
ENV DNF_EQUALL_FLAGS="-y --disableplugin=subscription-manager --setopt=tsflags=nodocs --setopt=install_weak_deps=0 --nodocs”
RUN set -ex
microdnf install $DNF_FLAGS(&& M)
OpenSSL
wget
glibc \ && RUNTIME_PROCEDLED_PACKAGES="$(rpm -qa|排序)”
&& mkdir -p /build/
#仅适用于构建时&& microdnf install $DNF_BALL_FLAGS
奥普塞斯尔-德威尔
GCC
krb5-devel
格利巴克-德韦尔
使
CMake
焦油
bzip2
git \ curl pkgconfig clang
\ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs| sh-s-y \ && source $HOME/.cargo/env \ && cargo install --version '=0.9.7' --force cargo-pgrx \ && cargo pgrx init --pg15 pg_config \ && git clone https://github.com/timescale/timescaledb-toolkit /build/timescaledb-toolkit \ && cd /build/timescaledb-toolkit/extension \ && cargo pgrx install --release \ && cargo run --manifest-path ../tools/post-install/Cargo.toml -- pg_config
#构建当前版本
&& git clone https://github.com/timescale/timescaledb /build/timescaledb
&& cd /build/timescaledb && rm -fr生成
&& git checkout ${TS_VERSION}
&& ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_BUILDKS =OFF -DTAP_BUILDKS =OFF -DGENERATE_DOWNGRADE_BUILDT =ON -DWARNINGS_AS_BUILDRS =OFF -DPROJECT_BUILDALL_METHOD=“docker”
&& cd build && make install
&& cd ~
#移除编译相关的依赖。&& echo“正在删除所有构建依赖项。”\ && BUILD_DEPENDENCIES=$(RUNTIME-13 <(echo“$RUNTIME_RUNLED_PACKAGES”)<(echo“$(rpm -qa| sort)”))\ && rpm -e --allmatches --nodeps --noscripts --notriggers $BUILD_DEPENDENCIES
&& microdnf clean all --enablerepo='' --disableplugin=subscription-manager \ && rustup self uninstall -y \ && rm -rf/root/.cargo \ && rm-rf/root/.rustup \ && rm -rf /root/.pgrx
&& rm -rf
/build
“${HOME}/.cache”
/var/cache/yum
&& sed -r -i“s/[#]
\s*(shared_preload_libraries)\s*=\s '(.*'/\1 = 'timescaledb,\2'/; s/,'/'/”$(pg_config --sharedir)/postgresql.conf.sample

展开查看全部

相关问题