From 2103bbc58024d4d1208ca35b52b50f8122bd27aa Mon Sep 17 00:00:00 2001 From: "Julius von Froreich (jvf)" Date: Fri, 17 Aug 2018 14:42:22 +0200 Subject: [PATCH 1/3] fix package versions --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e32b60f..714060b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM node:8.11.3-slim RUN apt-get update && \ apt-get install -y --no-install-recommends \ - git \ - python \ - make \ - gcc \ - g++ \ - libc6-dev + git=1:2.1.4-2.1+deb8u6 \ + python=2.7.9-1 \ + make=4.0-8.1 \ + gcc=4:4.9.2-2 \ + g++=4:4.9.2-2 \ + libc6-dev=2.19-18+deb8u10 RUN git clone https://github.com/Financial-Times/polyfill-service.git /polyfill From df65eb2626016516d3ea0658addd5354abce9168 Mon Sep 17 00:00:00 2001 From: "Julius von Froreich (jvf)" Date: Fri, 17 Aug 2018 14:46:59 +0200 Subject: [PATCH 2/3] fix spacing in CMD directive --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 714060b..9f13015 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,5 @@ ENV NODE_ENV dev EXPOSE ${PORT} -CMD ["node" ,"--optimize_for_size" ,"--max_old_space_size=460" ,"--gc_interval=100" ,"packages/polyfill-service/bin/polyfill-service"] +CMD ["node", "--optimize_for_size", "--max_old_space_size=460", "--gc_interval=100", "packages/polyfill-service/bin/polyfill-service"] From 947b5920fd04610145032db1deb7caec319bfe8f Mon Sep 17 00:00:00 2001 From: "Julius von Froreich (jvf)" Date: Fri, 17 Aug 2018 15:06:08 +0200 Subject: [PATCH 3/3] clean apt artifacts after installing packages reduces image size marginally --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9f13015..ca13afd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,9 @@ RUN apt-get update && \ make=4.0-8.1 \ gcc=4:4.9.2-2 \ g++=4:4.9.2-2 \ - libc6-dev=2.19-18+deb8u10 + libc6-dev=2.19-18+deb8u10 && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/Financial-Times/polyfill-service.git /polyfill