1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2024-11-28 08:58:52 +02:00
explain.depesz.com/docker/Dockerfile

41 lines
1.2 KiB
Docker
Raw Normal View History

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
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
COPY docker/explain.json explain.pl ./
ENTRYPOINT /explain/explain.pl daemon