From 644093fdc5cdf84d5d70674dce18a1500374f094 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Feb 2021 20:24:05 +0300 Subject: [PATCH] reduce image size --- db/Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/db/Dockerfile b/db/Dockerfile index aa0d5d4..1cbacd2 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,15 +1,16 @@ FROM postgres:13 EXPOSE 5432 -RUN apt-get update -RUN apt-get -y install git libpq-dev postgresql-server-dev-13 -RUN apt-get -y install gcc make - COPY init-count-bits.sh /docker-entrypoint-initdb.d/ -RUN git clone https://github.com/sldab/count-bits.git /opt/count-bits && \ +RUN apt-get update && \ + apt-get -y install git libpq-dev postgresql-server-dev-13 gcc make && \ + git clone https://github.com/sldab/count-bits.git /opt/count-bits && \ cd /opt/count-bits && \ make && \ sed -i.bak 's/create_functions: install/create_functions:/' Makefile && \ - make install + make install && \ + apt-get -y remove git libpq-dev postgresql-server-dev-13 && \ + apt-get -y autoremove && \ + apt-get -y clean