From 30920f4e20ecc6d68c7d5038ae26511daf1bd0d9 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 7 Dec 2021 17:20:16 +0100 Subject: [PATCH] Switch to "node:17" as base image and install Python dependencies manually. This saves about 220 MB in image size. --- server/docker/Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/docker/Dockerfile b/server/docker/Dockerfile index 2e8e3b0..92482f6 100644 --- a/server/docker/Dockerfile +++ b/server/docker/Dockerfile @@ -1,13 +1,18 @@ -FROM nikolaik/python-nodejs:python3.9-nodejs15 +FROM node:17 ADD . /app ADD docker/config.js.docker /app/config.js -RUN apt-get update || : && apt-get install pdftk python-pypdf2 -y +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + pdftk \ + python3 \ + python3-pip \ + python3-pypdf2 WORKDIR /app RUN pip install svglib -RUN npm install +RUN npm install -CMD ["node", "server.js"] \ No newline at end of file +CMD ["node", "server.js"]