2022-07-12 16:08:48 +02:00
|
|
|
FROM debian:buster
|
|
|
|
|
|
|
|
WORKDIR /explain
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y libmojolicious-perl \
|
|
|
|
libemail-sender-perl \
|
|
|
|
libdate-simple-perl \
|
|
|
|
libemail-valid-perl \
|
|
|
|
libxml-simple-perl \
|
|
|
|
libdbd-pg-perl \
|
|
|
|
libmodule-build-perl \
|
|
|
|
libyaml-perl \
|
|
|
|
libjson-perl \
|
|
|
|
libclone-perl \
|
|
|
|
libtest-deep-perl \
|
|
|
|
libtest-exception-perl \
|
|
|
|
libnumber-bytes-human-perl \
|
|
|
|
pgformatter \
|
|
|
|
curl \
|
|
|
|
build-essential
|
|
|
|
|
|
|
|
RUN curl -L cpanmin.us | perl - -n Mojolicious
|
|
|
|
|
|
|
|
RUN cpan install Pg::Explain
|
2022-09-14 20:52:52 +02:00
|
|
|
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN curl https://gitlab.com/depesz/pg-sql-prettyprinter/-/archive/main/pg-sql-prettyprinter-main.tar.bz2 -o pg-sql-prettyprinter-main.tar.bz2 && \
|
|
|
|
tar xjvf pg-sql-prettyprinter-main.tar.bz2 && \
|
|
|
|
cd pg-sql-prettyprinter-main && \
|
|
|
|
perl Build.PL && \
|
|
|
|
./Build && \
|
|
|
|
./Build test && \
|
|
|
|
./Build install
|
|
|
|
WORKDIR /explain
|
|
|
|
|
2022-07-12 16:08:48 +02:00
|
|
|
COPY docker/explain.json explain.pl ./
|
|
|
|
|
|
|
|
ENTRYPOINT /explain/explain.pl daemon
|