Commit ac2a6373 authored by chernosovdv's avatar chernosovdv

пробую поиграть с лейблами при сборке

parent 4d25f661
Pipeline #5920 passed with stage
in 12 seconds
......@@ -2,11 +2,9 @@ ARG POSTGRES_VERSION=12.4
ARG TIMESCALEDB_VER='latest-pg12'
# -----------------------------------
FROM timescale/timescaledb:${TIMESCALEDB_VER} AS base_timescaledb
# -----------------------------------
FROM postgres:${POSTGRES_VERSION}-alpine AS base
LABEL postgres.version=${POSTGRES_VERSION}
# -----------------------------------
FROM base AS build
......@@ -14,6 +12,10 @@ FROM base AS build
# add common build dependencies
RUN apk add --no-cache build-base postgresql-dev clang llvm9
# -----------------------------------
FROM timescale/timescaledb:${TIMESCALEDB_VER} AS base_timescaledb
# не хочу собирать из исходников, просто скопирую из официального образа
# -----------------------------------
# расширение оказалось очень ограниченным. Даже проброс (pushdown) инструкции limit на mysql-сервер не поддерживается.
# но импортировать схему и маленькие таблицы можно - уже хлеб.
......@@ -105,6 +107,7 @@ COPY --from=build_mysql_fwd /usr/local/lib/postgresql/mysql_fdw.so /usr/local/li
COPY --from=build_mysql_fwd /usr/local/share/postgresql/extension/mysql_fdw* /usr/local/share/postgresql/extension/
COPY --from=build_mysql_fwd /usr/local/lib/postgresql/bitcode/mysql_fdw/* /usr/local/lib/postgresql/bitcode/mysql_fdw/
COPY --from=build_mysql_fwd /usr/local/lib/postgresql/bitcode/mysql_fdw.index.bc /usr/local/lib/postgresql/bitcode/
LABEL postgres.extension.mysql_fdw="installed"
# --- ...mysql_fdw
# --- timescaledb
......@@ -112,6 +115,7 @@ COPY --from=base_timescaledb /usr/local/bin/timescaledb-* /usr/local/bin/
COPY --from=base_timescaledb /usr/local/lib/postgresql/timescaledb* /usr/local/lib/postgresql/
COPY --from=base_timescaledb /usr/local/share/postgresql/extension/timescaledb* /usr/local/share/postgresql/extension/
RUN sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/local/share/postgresql/postgresql.conf.sample
LABEL postgres.extension.timescaledb="installed"
# --- ...timescaledb
......@@ -121,6 +125,7 @@ COPY --from=build_pg_pathman /usr/local/share/postgresql/extension/pg_pathman* /
COPY --from=build_pg_pathman /usr/local/lib/postgresql/bitcode/pg_pathman/* /usr/local/lib/postgresql/bitcode/pg_pathman/
COPY --from=build_pg_pathman /usr/local/lib/postgresql/bitcode/pg_pathman.index.bc /usr/local/lib/postgresql/bitcode/
RUN sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'pg_pathman,\2'/;s/,'/'/" /usr/local/share/postgresql/postgresql.conf.sample
LABEL postgres.extension.pg_pathman="installed"
# --- ...pg_pathman
......@@ -137,6 +142,7 @@ COPY --from=build_postgis /usr/local/share/postgresql/extension/postgis* /usr/lo
COPY --from=build_postgis /usr/local/share/postgresql/contrib/postgis-3.0/* /usr/local/share/postgresql/contrib/postgis-3.0/
COPY --from=build_postgis /usr/local/lib/postgresql/bitcode/postgis-3/* /usr/local/lib/postgresql/bitcode/postgis-3/
COPY --from=build_postgis /usr/local/lib/postgresql/bitcode/postgis*.index.bc /usr/local/lib/postgresql/bitcode/
LABEL postgres.extension.postgis="installed"
# --- ...postgis
......@@ -145,4 +151,5 @@ COPY --from=build_temporal_tables /usr/local/lib/postgresql/temporal_tables.so /
COPY --from=build_temporal_tables /usr/local/share/postgresql/extension/temporal_tables* /usr/local/share/postgresql/extension/
COPY --from=build_temporal_tables /usr/local/lib/postgresql/bitcode/temporal_tables/* /usr/local/lib/postgresql/bitcode/temporal_tables/
COPY --from=build_temporal_tables /usr/local/lib/postgresql/bitcode/temporal_tables.index.bc /usr/local/lib/postgresql/bitcode/
LABEL postgres.extension.temporal_tables="installed"
# --- ...temporal_tables
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment