From a8b40ea6d6db59ddee35901a3ade95554b69095d Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Mon, 1 Nov 2021 12:50:15 -0700 Subject: [PATCH] fix(Dockerimage): Remove unnecessary compiler toolchain dependencies After better-sqlite3 added support for [pre-compiled binaries](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v6.0.0), we no longer need to install a compiler toolchain to run npm install in our Docker images. pelias/docker-baseimage#23 removes the compiler toolchain from our Pelias baseimages. In order for the toolchain to be removed from the Placeholder image in particular, we also need to remove those dependencies here. Similar to the whosonfirst repository in https://github.com/pelias/whosonfirst/pull/532, this change by itself is effectively a no-op. After the baseimage removes the compiler toolchain,the size of the Placeholder docker image goes from 495MB to 266MB, an impressive 229MB savings! --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6a7bcb64..94cc776f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM pelias/baseimage # downloader apt dependencies # note: this is done in one command in order to keep down the size of intermediate containers -RUN apt-get update && apt-get install -y build-essential python jq lbzip2 parallel && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y jq lbzip2 parallel && rm -rf /var/lib/apt/lists/* # change working dir ENV WORKDIR /code/pelias/placeholder