DockerFile
FROM postgres:13.5-alpine as build
ENV VERSION 1.3.0
RUN apk --no-cache add curl python3 gcc g++ make musl-dev openssl-dev cmake curl-dev util-linux-dev;\
chmod a+rwx /usr/local/lib/postgresql && \
chmod a+rwx /usr/local/share/postgresql/extension && \
mkdir -p /usr/local/share/doc/postgresql/contrib && \
chmod a+rwx /usr/local/share/doc/postgresql/contrib
RUN wget -O fdw.zip -c https://github.com/adjust/clickhouse_fdw/archive/refs/tags/$VERSION.zip && \
unzip fdw.zip && \
cd clickhouse_fdw-$VERSION && mkdir build && cd build && cmake .. && make && DESTDIR=/tmp/data make install
FROM postgres:13.5-alpine as install
RUN apk --no-cache add libcurl
COPY --from=build /tmp/data/ /
版本可以修改 自己想要的版本
创建镜像
docker build -t postgres-clickhouse-fdw:v135.13 .
镜像导出
docker save postgres-clickhouse-fdw:v135.13 > postgres-clickhouse-fdw.tar
镜像导入
docker load < postgres-clickhouse-fdw.tar
镜像地址
Error
可能的错误解决