Created
July 20, 2021 21:38
-
-
Save mmmcorpsvit/b94aba2b77a6cf17bc26aaa93882ce27 to your computer and use it in GitHub Desktop.
Docker for: Postgres 13.3 + ZomboDB 3000 (build from sources), danger: very long build time!!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM postgres:13.3 | |
COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance | |
RUN chmod +x /usr/local/bin/maintenance/* | |
RUN mv /usr/local/bin/maintenance/* /usr/local/bin \ | |
&& rmdir /usr/local/bin/maintenance | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG ES_VERSION=7.13.2 | |
RUN apt-get update -y -qq --fix-missing && apt-get install -y git make postgresql-server-dev-13 gcc libcurl4-gnutls-dev libz-dev \ | |
bison flex zlib1g zlib1g-dev \ | |
pkg-config libssl-dev libreadline-dev unzip wget curl \ | |
clang gcc make build-essential libz-dev zlib1g-dev strace libssl-dev pkg-config postgresql-server-dev-13 | |
ENV CARGO_HOME=/tmp/.cargo | |
ENV RUSTUP_HOME=/tmp/.rust | |
ENV PATH=$PATH:/tmp/.cargo/bin | |
RUN cd /tmp/ && wget -O rustup-init.sh https://sh.rustup.rs | |
RUN cd /tmp/ && sh rustup-init.sh -y | |
RUN chmod -R 777 /tmp/.cargo/ | |
USER postgres | |
RUN cargo install cargo-pgx | |
RUN cargo pgx init --pg13=`which pg_config` | |
ENV CPUS=40 | |
RUN cd /tmp/ && git clone --depth 1 https://github.com/zombodb/zombodb.git | |
USER root | |
RUN chown -R postgres:postgres /usr/share/postgresql/13/extension | |
RUN chown -R postgres:postgres /usr/lib/postgresql/13/lib | |
RUN chown -R postgres:postgres /var/run/postgresql | |
RUN chown -R postgres:postgres /var/lib/postgresql/data | |
RUN ECHO Please wait for long running operations... | |
USER postgres | |
RUN cd /tmp/zombodb && cargo pgx install --release | |
ENV POSTGRES_HOST=postgres | |
ENV POSTGRES_PORT=5432 | |
ENV POSTGRES_DB=cars_project | |
ENV POSTGRES_USER=postgres | |
ENV POSTGRES_PASSWORD=postgres | |
EXPOSE 5432:5432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment