From ebdbb8114d95c2bf7cae8cc9ae3b76390b8a641a Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 11 Jan 2023 11:37:56 +0100 Subject: [PATCH] Improve Dockerfile to reduce image size --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 275d1e0..8f43dba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ WORKDIR /root # copy the mermaidcli node package into the container and install COPY ./mermaidcli/* ./ -RUN npm install +RUN npm install && npm cache clean --force; ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update 2>/dev/null && \ @@ -65,7 +65,7 @@ RUN apt-get update 2>/dev/null && \ xdg-utils \ wget \ libxshmfence1 \ - 2>/dev/null + 2>/dev/null && rm -rf /var/lib/apt/lists/*; COPY --from=go /root/bin/app ./app