Skip to content

DockerHub Distribution #13

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

Closed
MahatmaFatalError opened this issue Aug 15, 2019 · 3 comments
Closed

DockerHub Distribution #13

MahatmaFatalError opened this issue Aug 15, 2019 · 3 comments

Comments

@MahatmaFatalError
Copy link

It would be great to have a ready-to-run docker image. This would lower the hurdle to get started with aqo.

@danolivo
Copy link
Collaborator

Thank you for turn your attention to it. I will try to do it soon.

@Murthy10
Copy link

In the meanwhile my (really not optimized) Dockerfile could maybe help.

FROM ubuntu:18.04

RUN apt-get update
RUN apt-get install make gcc vim git build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev -y \
&& cd / \
&& git clone https://github.com/postgres/postgres.git \
&& cd /postgres \
&& git checkout REL_11_4 \
&& git clone https://github.com/tigvarts/aqo.git contrib/aqo \
&& cd contrib/aqo \
&& git checkout stable11 \
&& cd /postgres \
&& patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_pg11.patch \
&& ./configure \
&& make clean && make && make install \
&& cd contrib/aqo \
&& make && make install \
&& useradd -ms /bin/bash postgres \
&& chown -R postgres:postgres /postgres/ \
&& su postgres -c "make check" \
&& mkdir /data \
&& chown -R postgres:postgres /data/ \
&& su postgres -c "/postgres/tmp_install/usr/local/pgsql/bin/initdb -D /data/" \
&& echo "shared_preload_libraries = 'aqo'" >> /data/postgresql.conf 

ENTRYPOINT su postgres -c "/postgres/tmp_install/usr/local/pgsql/bin/pg_ctl -D /data/ -l /data/postgres.log start" && tail -f /data/postgres.log

Simply build and run it

docker build . -t aqo
docker run -p 5432:5432 aqo

@danolivo
Copy link
Collaborator

At the branch stable11 I commit Dockerfile. It contains also some optimized postgresql.conf settings.
Please, check usability of this template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants