Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plan to build packages for easy install on Alpine linux? #756

Open
bnm12 opened this issue Apr 14, 2023 · 0 comments
Open

Any plan to build packages for easy install on Alpine linux? #756

bnm12 opened this issue Apr 14, 2023 · 0 comments
Labels
feature-request And area of analysis that could be made easier

Comments

@bnm12
Copy link

bnm12 commented Apr 14, 2023

Is your feature request related to a problem? Please describe.
The main TimescaleDB docker image runs alpine and I'd like to add toolkit to it.
The only other option is the timescaledb-ha image which is huge (>800mb) compared to the timescaledb image which is <200mb.
This matters quite a bit for the download and uncompress times of my github build and test pipelines

Describe the solution you'd like
I'd like to be able to use apk add to install the extension like with apt install on debian

Describe alternatives you've considered
I've tried adding the dependencies and building from source but that takes a very long time to execute and is worse than just using timescaledb-ha time wise

Additional context
A poorly tested but seemingly working dockerfile for building and adding toolkit to the main timescale db alpine image for reference if someone else searches for this:


FROM base as toolkit

RUN apk add --no-cache pkgconfig openssl-dev gcc postgresql14-dev curl jq make musl-dev

RUN chown postgres /usr/local/share/postgresql/extension /usr/local/lib/postgresql

USER postgres
ENV PATH="/var/lib/postgresql/.cargo/bin:${PATH}" RUSTFLAGS='-C target-feature=-crt-static'
WORKDIR /var/lib/postgresql

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --profile=minimal -c rustfmt && \
    cargo install --version '=0.7.1' --force cargo-pgx && \
    cargo pgx init --pg14 pg_config

RUN mkdir timescaledb-toolkit && \
    curl -s -L `curl -s https://api.github.com/repos/timescale/timescaledb-toolkit/releases/latest | jq -r ".tarball_url"` | tar -zx -C timescaledb-toolkit --strip-components 1

RUN cd timescaledb-toolkit/extension && \
    cargo pgx install --release && \
    cargo run --manifest-path ../tools/post-install/Cargo.toml -- pg_config

FROM base AS final

COPY --from=toolkit /usr/local/share/postgresql/extension/timescaledb_toolkit* /usr/local/share/postgresql/extension/
COPY --from=toolkit /usr/local/lib/postgresql/timescaledb_toolkit* /usr/local/lib/postgresql/```
@bnm12 bnm12 added the feature-request And area of analysis that could be made easier label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request And area of analysis that could be made easier
Projects
None yet
Development

No branches or pull requests

1 participant